-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
55 lines (48 loc) · 1.25 KB
/
Copy pathdocker-compose.yml
File metadata and controls
55 lines (48 loc) · 1.25 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
services:
db:
image: mysql:9.2.0
environment:
MYSQL_DATABASE: 'dicom_db'
MYSQL_USER: 'dicom_user'
MYSQL_PASSWORD: 'dicom_password'
MYSQL_ROOT_PASSWORD: 'root'
ports:
- "3306:3306"
volumes:
- db_data:/var/lib/mysql # Mounts the named volume
networks:
- backend
python-api:
build:
context: ./backend/python-api
dockerfile: Dockerfile
volumes:
# Map the host's "uploads" directory to the container's "uploads" directory.
# This ensures that any files uploaded to /app/uploads persist on the host.
- uploads:/app/uploads
networks:
- backend
node-api:
build:
context: ./backend/node-api
dockerfile: Dockerfile
networks:
- backend
environment:
NODE_ENV: production
entrypoint: ["/bin/sh", "-c", "until nc -z -v -w30 db 3306; do echo 'Waiting for database connection...'; sleep 5; done; echo 'Database is up!'; npx sequelize-cli db:migrate && node server.mjs"]
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- "80:80"
networks:
- backend
volumes:
- ./frontend/nginx.conf:/etc/nginx/conf.d/default.conf:ro
volumes:
db_data:
uploads:
networks:
backend: