-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
52 lines (52 loc) · 1.25 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
version: "3.9"
services:
db:
image: postgres:15.2
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test_db
ports:
- "5432:5432"
web:
build:
context: .
dockerfile: Dockerfile-api
environment:
DB_CONNECT_STR: postgresql://postgres:postgres@db:5432/test_db
command: uvicorn api:app --host 0.0.0.0 --port 5001
depends_on:
- db
ports:
- "5001:5001"
volumes:
- ./backend:/api
frontend:
build: ./frontend
environment:
REACT_APP_API_URL_DEVELOPMENT: http://localhost:5001/
command: npm start --host 0.0.0.0 --port 3000
ports:
- "3000:3000"
volumes:
- ./frontend:/frontend
db_setup:
build:
context: .
dockerfile: Dockerfile-worker
environment:
DB_CONNECT_STR: postgresql://postgres:postgres@db:5432/test_db
command: python worker/copy_data_dev_db.py
depends_on:
- db
worker:
build:
context: .
dockerfile: Dockerfile-worker
environment:
DB_CONNECT_STR: postgresql://postgres:postgres@db:5432/test_db
command: python worker/traffic.py
depends_on:
- db
volumes:
- ./backend:/worker