-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.prod.yaml
83 lines (73 loc) · 1.55 KB
/
docker-compose.prod.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
version: "3.8"
services:
backend:
container_name: 'fast-commerce-backend'
command: sh "docker/scripts/entrypoint.sh"
tty: true
image: ml06py/fast_commerce:latest
ports:
- "8000:8000"
volumes:
- ./backend:/backend
networks:
- main
environment:
- ENVIRONMENT=PRODUCTION
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
smtp4dev:
condition: service_started
postgres:
container_name: 'fast-commerce-postgres'
image: postgres:15.4-alpine
env_file:
- ./backend/envs/pg.env
expose:
- "5432"
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 2s
timeout: 5s
retries: 5
networks:
- main
redis:
container_name: 'fast-commerce-redis'
image: redis:7-alpine
expose:
- "6379"
volumes:
- redis-data:/data
networks:
- main
smtp4dev:
image: rnwood/smtp4dev:v3
container_name: 'fast-commerce-smtp4dev'
ports:
- "5000:80"
restart: always
networks:
- main
celery:
container_name: 'fast-commerce-celery'
command: sh "docker/scripts/celery.sh"
tty: true
image: ml06py/fast_commerce:latest
volumes:
- ./backend:/backend
networks:
- main
depends_on:
- backend
env_file:
- ./backend/envs/celery.env
networks:
main:
volumes:
postgres-data:
redis-data: