-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
80 lines (76 loc) · 2.08 KB
/
docker-compose.dev.yml
File metadata and controls
80 lines (76 loc) · 2.08 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
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "${POSTGRES_PORT:-5432}:5432"
volumes:
- postgres_data_dev:/var/lib/postgresql/data
networks:
- mediqux_network_dev
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
backend:
build: ./backend
container_name: mediqux_backend
ports:
- "${BACKEND_DOCKER_PORT:-3000}:3000"
environment:
NODE_ENV: ${NODE_ENV:-development}
DEBUG: ${DEBUG:-true}
LOG_LEVEL: ${LOG_LEVEL:-debug}
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}
volumes:
- ./backend:/app
- /app/node_modules
- ./uploads:/app/uploads
depends_on:
postgres:
condition: service_healthy
networks:
- mediqux_network_dev
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:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: mediqux_frontend
ports:
- "${FRONTEND_DOCKER_PORT:-8080}:80"
environment:
MEDIQUX_API_URL: ${BACKEND_URL:-http://localhost:3000/api}
volumes:
- ./frontend/css:/usr/share/nginx/html/css
- ./frontend/js:/usr/share/nginx/html/js
depends_on:
- backend
networks:
- mediqux_network_dev
volumes:
postgres_data_dev:
driver: local
networks:
mediqux_network_dev:
name: mediqux_network_dev
driver: bridge