-
Notifications
You must be signed in to change notification settings - Fork 84
/
docker-compose.yaml
88 lines (81 loc) · 1.62 KB
/
docker-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
version: '3.8'
networks:
app_network:
driver: bridge
services:
nginx:
build: ./frontend
container_name: nginx
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- ./certs/spotnet.xyz.chain.crt:/etc/nginx/spotnet.xyz.chain.crt:ro
- ./certs/spotnet.xyz.key:/etc/nginx/spotnet.xyz.key:ro
depends_on:
- backend
networks:
- app_network
backend:
build: .
restart: always
volumes:
- ./entrypoint.sh:/app/entrypoint.sh
env_file:
- .env
depends_on:
- db
expose:
- "8000"
networks:
- app_network
db:
image: postgres:16
container_name: postgres
restart: always
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- app_network
env_file:
- .env
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${DB_USER}" ]
interval: 10s
timeout: 5s
retries: 5
celery:
build: .
command: celery -A spotnet_tracker.celery_config worker --loglevel=INFO
volumes:
- .:/app
depends_on:
- redis
networks:
- app_network
celery_beat:
build: .
command: celery -A spotnet_tracker.celery_config beat --loglevel=INFO
volumes:
- .:/app
depends_on:
- redis
networks:
- app_network
redis:
image: redis:latest
restart: always
ports:
- "6379:6379"
volumes:
- redis_data:/data
networks:
- app_network
volumes:
postgres_data:
redis_data: