-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
80 lines (75 loc) · 2.04 KB
/
docker-compose.yml
File metadata and controls
80 lines (75 loc) · 2.04 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
---
services:
postgres:
image: postgres:17-alpine
container_name: mediqux_postgres
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- mediqux_network
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
backend:
image: ghcr.io/dmjoh/mediqux/mediqux-backend:${IMAGE_TAG}
container_name: mediqux_backend
environment:
NODE_ENV: production
DB_HOST: postgres
DB_PORT: ${POSTGRES_PORT:-5432}
DB_NAME: ${POSTGRES_DB}
DB_USER: ${POSTGRES_USER}
DB_PASSWORD: ${POSTGRES_PASSWORD}
JWT_SECRET: ${JWT_SECRET}
MAX_FILE_SIZE: ${MAX_FILE_SIZE:-10MB}
UPLOAD_PATH: ${UPLOAD_PATH:-/app/uploads}
PUID: ${PUID:-1000}
PGID: ${PGID:-1000}
ports:
- "${BACKEND_DOCKER_PORT:-3000}:3000"
volumes:
- mediqux_uploads:/app/uploads
depends_on:
postgres:
condition: service_healthy
networks:
- mediqux_network
restart: unless-stopped
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/api/health', (res) => process.exit(res.statusCode === 200 ? 0 : 1))"]
interval: 30s
timeout: 10s
retries: 3
frontend:
image: ghcr.io/dmjoh/mediqux/mediqux-frontend:${IMAGE_TAG}
container_name: mediqux_frontend
environment:
MEDIQUX_API_URL: ${BACKEND_URL:-http://localhost:3000/api}
ports:
- "${FRONTEND_DOCKER_PORT:-8080}:80"
depends_on:
- backend
networks:
- mediqux_network
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:80"]
interval: 30s
timeout: 10s
retries: 3
volumes:
postgres_data:
driver: local
mediqux_uploads:
driver: local
networks:
mediqux_network:
name: mediqux_network
driver: bridge