forked from DarknessUnder/yacs.n
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.development.yml
57 lines (51 loc) · 1.29 KB
/
docker-compose.development.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
version: "3.4"
# web (front-end) depends on api (back-end) depends on (db)
# nginx -> web -> api -> db [dependency chain]
volumes:
web_node_modules:
postgres_data:
services:
yacs_nginx:
container_name: yacs_nginx
image: nginx
ports:
- 80:80
volumes:
- ./src/web/nginx.development.conf:/etc/nginx/nginx.conf
depends_on:
- yacs_web
yacs_web:
build:
target: develop-stage
command: npm run serve
ports:
- 8080:8080
volumes:
- ./src/web:/app
- web_node_modules:/app/node_modules/
environment:
- YACS_API_HOST=http://yacs_api:5000
yacs_api:
command: /bin/bash -c "python tables/database_session.py && PYTHONPATH=. alembic upgrade head && uvicorn app:app --reload --host 0.0.0.0 --port 5000"
ports:
- 5000:5000
volumes:
- ./src/api:/usr/src
environment:
- ENV=development
- DEBUG=True
- DB_HOST=yacs_db
- DB_USER=yacs
- DB_PASS=${DB_PASS:-easy_dev_pass}
- DB_NAME=yacs
- DB_PORT=5432
- API_SIGN_KEY=${API_SIGN_KEY:-secretKey}
yacs_db:
ports:
- 5432:5432
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
- POSTGRES_DB=yacs
- POSTGRES_USER=yacs
- POSTGRES_PASSWORD=${DB_PASS:-easy_dev_pass}