-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-prod.yaml
91 lines (88 loc) · 1.92 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
84
85
86
87
88
89
90
91
version: "3.9"
services:
web-redis-prod:
container_name: redis-liveonsat
image: redis:7.0.4-bullseye
env_file:
- .env
ports:
- ${REDIS_PORT_DEV}:${REDIS_PORT_DEV}
volumes:
- redis_data:/var/lib/redis/data
networks:
- web-api-network-prod
worker-prod:
build:
context: .
working_dir: /app/backend/
restart: on-failure
command: celery --app core.worker.celery_exc worker --loglevel=INFO -E -B
env_file:
- .env
environment:
- CELERY_BROKER_URL=${CELERY_BROKER_URL}
- CELERY_RESULT_BACKEND=${CELERY_RESULT_BACKEND}
depends_on:
- liveonsat-api
- liveonsat-redis
networks:
- web-api-network
db-api-prod:
container_name: web-db-prod
restart: on-failure
image: postgres:14
env_file:
- .env
ports:
- 5435:${DB_PORT}
volumes:
- data:/var/lib/postgresql/data
environment:
- POSTGRES_NAME=${DB_NAME}
- POSTGRES_USER=${DB_USER}
- POSTGRES_PASSWORD=${DB_PWD}
- POSTGRES_DB=${DB_NAME}
networks:
- web-api-network
web-api-prod:
container_name: "web-api-container-prod"
restart: always
build:
context: .
working_dir: /app/backend
command: gunicorn --bind 0.0.0.0:${APP_PORT} manage:app
env_file:
- .env
environment:
- FLASK_APP=${FLASK_APP}
- FLASK_DEBUG=${FLASK_DEBUG}
- DATABASE_URI=${DATABASE_URI}
volumes:
- .:/app
- media:/app/backend/media/
ports:
- ${APP_PORT}:${APP_PORT}
depends_on:
- db-api
- liveonsat-redis
networks:
- web-api-network
nginx:
build: ./nginx
volumes:
- media:/app/backend/media/
container_name: web-api-nginx
env_file:
- .env
ports:
- 1338:80
depends_on:
- web-api
networks:
- web-api-network
networks:
web-api-network:
driver: bridge
volumes:
data:
media: