-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
129 lines (118 loc) · 2.52 KB
/
compose.yaml
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
services:
# nginx:
# image: nginx
# container_name: nginx_proxy
# volumes:
# - ./nginx/nginx.conf:/etc/nginx/nginx.conf
# - ./certificates:/etc/nginx/certificates
# - ./templates:/etc/nginx/templates
# ports:
# - "80:80"
# - "443:443"
# depends_on:
# - web
# - market_data
# networks:
# - app-network
# mem_limit: 256M
web:
build: .
container_name: carmagnole
volumes:
- type: bind
source: ./
target: /carmagnole
## etl folder bindings meant for debugging only
# - type: bind
# source: ./etl/logs
# target: /carmagnole/etl/logs
# - type: bind
# source: ./etl/data
# target: /carmagnole/etl/data
# - ./etl/data:/carmagnole/etl/data
env_file:
- .env
ports:
- "8000:8000"
extra_hosts:
- "host.docker.internal:host-gateway"
networks:
- app-network
mem_limit: 512m
cpus: '0.5'
environment:
- WATCHFILES_FORCE_POLLING=true
- CHOKIDAR_USEPOLLING=true
restart: always
celery:
build:
context: .
dockerfile: Dockerfile.celery
command: celery -A carmagnole worker -l info --concurrency=2 --max-tasks-per-child=50
volumes:
- type: bind
source: ./
target: /carmagnole
env_file:
- .env
networks:
- app-network
depends_on:
- web
- redis_server
restart: always
cpus: '1'
celery-beat:
build:
context: .
dockerfile: Dockerfile.celery
command: celery -A carmagnole beat -l info
volumes:
- type: bind
source: ./
target: /carmagnole
env_file:
- .env
networks:
- app-network
depends_on:
- web
- celery
- redis_server
restart: always
cpus: '0.5'
market_data:
build:
context: ./
dockerfile: Dockerfile.market_data
container_name: market_live_fetcher
env_file:
- .env
networks:
- app-network
mem_limit: 256M
restart: always
redis_server:
build:
context: ./
dockerfile: Dockerfile.redis_server
container_name: redis_server
# sysctls:
# - net.core.somaxconn=1024
# - vm.overcommit_memory=1
env_file:
- .env
networks:
- app-network
ports:
- "6379:6379"
mem_limit: 128M
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 20s
timeout: 5s
retries: 5
restart: always
networks:
app-network:
driver: bridge