-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
37 lines (34 loc) · 983 Bytes
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
version: '3.1'
services:
# Database (MySQL)
mariadb:
container_name: mariadb_1
image: mariadb
restart: always
volumes:
- ./mysql:/var/lib/mysql
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
networks:
- production_network
# Application (Python+Poetry)
candle_aggregator:
build:
dockerfile: python.dockerfile
context: .
container_name: candle_aggregator_1
image: candle_aggregator
restart: always
volumes:
- .:/app
depends_on:
- mariadb
entrypoint: ['/root/.poetry/bin/poetry', 'run', 'python', 'candlestick_aggregator/main.py']
networks:
- production_network
# Creates a common network for the services, that enables the comunication between
# the containers using the container_name instead of the IP address. This is necessary
# since the containers don't retain the same IP address every time they are created.
networks:
production_network:
driver: bridge