-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
50 lines (45 loc) · 1.17 KB
/
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
42
43
44
45
46
47
48
49
50
version: '3.8'
services:
api:
build:
context: ./project/backend
dockerfile: Dockerfile
# entrypoint: ["/usr/src/entrypoint.sh"]
command: uvicorn app.main:app --reload --workers 1 --host 0.0.0.0 --port 8000
# command: gunicorn app.main:app -w 4 -k uvicorn.workers.UvicornWorker -b 0.0.0.0:8000
volumes:
- ./project/backend:/usr/src/
ports:
- 8004:8000
environment:
- ENVIRONMENT=dev
- DATABASE_URL=postgres://postgres:postgres@api-db:5432/api_dev
- DATABASE_TEST_URL=postgres://postgres:postgres@api-db:5432/api_test
depends_on:
- api-db
api-db:
build:
context: ./project/backend/db
dockerfile: Dockerfile
expose:
- 5432
ports:
- 15432:5432
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
front:
stdin_open: true
build:
context: ./project/frontend
dockerfile: Dockerfile
volumes:
- ./project/frontend:/usr/src/
- /usr/src/node_modules
ports:
- 3007:3000
environment:
- NODE_ENV=development
- REACT_APP_API_SERVICE_URL=${REACT_APP_API_SERVICE_URL}
depends_on:
- api