-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.prod.yaml
54 lines (50 loc) · 1.09 KB
/
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
services:
nginx-prod:
image: nginx-prod
restart: always
build:
context: frontend/
target: serve
args:
VITE_APP_TITLE: ${VITE_APP_TITLE}
volumes:
- ./nginx/nginx.prod.conf:/etc/nginx/conf.d/default.conf:ro
ports:
- 80:80
depends_on:
- backend-prod
backend-prod:
image: backend-prod
restart: always
build:
context: backend/
target: production
command:
- "sh"
- "-c"
- |
alembic upgrade head \
&& python ./src/db/init_db.py \
&& gunicorn src.main:app -b 0.0.0.0 -w 4 -k uvicorn.workers.UvicornWorker
env_file:
- .env
environment:
- PRODUCTION=True
# depends_on:
# - postgres-dev
# postgres-dev:
# image: postgres:16-alpine
# restart: unless-stopped
# volumes:
# - postgres-data:/var/lib/postgresql/data/
# # ports:
# # - 5432:5432
# env_file:
# - .env
# healthcheck:
# test: [ "CMD", "pg_isready" ]
# interval: 10s
# timeout: 5s
# retries: 5
# volumes:
# postgres-data: