-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
61 lines (55 loc) · 1.45 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
version: "3"
services:
appserver:
container_name: appserver
build: ./app
restart: always
env_file:
- app/.env
#command: uvicorn src.app:app --host 0.0.0.0 --port 8000
command: sh -c "python backend_pre_start.py &&
alembic upgrade head &&
uvicorn src.app:app --host 0.0.0.0 --port 8000"
#command: sh -c "python /app/backend_pre_start.py &&
# cd app &&
# alembic upgrade head &&
# cd .. &&
# uvicorn app.src.app:app --host 0.0.0.0 --port 8000"
networks:
- db_network
- web_network
depends_on:
- db
deploy:
placement:
constraints:
- node.role == manager
db:
image: "postgres:14"
ports:
- "5432:5432"
volumes:
- fastapi_dashboard_data_v_001:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=wesleyquest
- POSTGRES_PASSWORD=Wqasdf01!
- POSTGRES_DB=postgres
networks:
- db_network
nginx:
container_name: nginx
restart: always
image: "nginx:1.22.1"
ports:
- "9090:9090"
volumes:
- ./nginx_config.conf:/etc/nginx/nginx.conf #/etc/nginx/conf.d/default.conf /etc/nginx/nginx.conf
networks:
- web_network
depends_on:
- appserver
volumes:
fastapi_dashboard_data_v_001:
networks:
db_network:
web_network: