-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
41 lines (39 loc) · 948 Bytes
/
docker-compose.yml
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
version: '3'
services:
frontend:
image: nginx:alpine
ports:
- "3001:80"
volumes:
- ./react-vite/dist:/usr/share/nginx/html
- ./nginx.conf:/etc/nginx/conf.d/default.conf # Mount custom NGINX config
depends_on:
- api
api:
build: .
ports:
- "5000:5000"
env_file:
- .env
environment:
FLASK_DEBUG: 1
volumes:
- .:/usr/local/app
command: >
sh -c "flask db upgrade &&
flask seed all &&
gunicorn -w 2 -b 0.0.0.0:5000 --timeout 120 --reload app:app"
depends_on:
db:
condition: service_healthy
db:
image: postgres:14-alpine
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
retries: 5
timeout: 3s