-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
104 lines (83 loc) · 2.19 KB
/
docker-compose.dev.yml
File metadata and controls
104 lines (83 loc) · 2.19 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
version: '3.10'
#----------------------
#----------------------
services:
frontend:
#----------------------
build:
context: ./frontend
dockerfile: Dockerfile.dev
volumes:
- './frontend:/app'
- '/app/node_modules'
#name modules as a separate volume to avoid overwrite from local
command: yarn serve --port 8080
ports:
- 127.0.0.1:8080:8080
environment:
- CHOKIDAR_USEPOLLING=true
depends_on:
backend:
condition: service_healthy
backend:
#----------------------
build:
context: ./backend
dockerfile: Dockerfile.dev
ports:
#app backend
- 127.0.0.1:80:80
#debugpy
- 127.0.0.1:5678:5678
#jupyternotes
- 127.0.0.1:8888:8888
volumes:
- './backend:/app'
#command: ["sh", "-c", "python -m debugpy --wait-for-client --listen 0.0.0.0:5678 & uvicorn rimsdash.main:app --reload --host 0.0.0.0 --port 80"]
command: uvicorn rimsdash.main:app --reload --host 0.0.0.0 --port 80
healthcheck:
test: curl --fail http://localhost:80/rims/api/v1/ready || exit 1
interval: 5s
timeout: 5s
retries: 3
start_period: 5s
depends_on:
db:
condition: service_healthy
db:
#----------------------
image: postgres:12
volumes:
- .rdb_postgres_data_dev:/var/lib/postgresql/data/
ports:
- 127.0.0.1:5432:5432
environment:
- POSTGRES_USER_FILE=/run/secrets/db_user
- POSTGRES_PASSWORD_FILE=/run/secrets/db_root_password
- POSTGRES_DB_FILE=/run/secrets/db_name
secrets:
- db_user
- db_name
- db_root_password
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
#note: attempts to connect as root and throws error in log, seems to still work
interval: 10s
timeout: 5s
retries: 5
#----------------------
#----------------------
secrets:
db_user:
file: .secrets/db_user.txt
db_name:
file: .secrets/db_name.txt
db_root_password:
file: .secrets/db_root_password.txt
#----------------------
#----------------------
volumes:
rdb_postgres_data_dev:
driver: local
#----------------------
#----------------------