-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
70 lines (65 loc) · 1.98 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
70 lines (65 loc) · 1.98 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
name: virtual-lab-dev
services:
postgres:
image: postgres:17-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: dev-postgres
POSTGRES_DB: backend_db
volumes:
- postgres_dev_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $$POSTGRES_DB -U $$POSTGRES_USER"]
interval: 2s
timeout: 3s
retries: 15
ports:
- "127.0.0.1:5432:5432"
backend:
image: node:25-alpine
working_dir: /app
command: sh -c "npm ci && npm run dev"
env_file:
- ./.env
- ./.env.development
environment:
NODE_ENV: development
DATABASE_URL: postgresql://postgres:dev-postgres@postgres:5432/backend_db
PORT: 3000
volumes:
- ./backend:/app
- backend_dev_node_modules:/app/node_modules
- ./certs:/certs:ro
depends_on:
postgres:
condition: service_healthy
ports:
- "127.0.0.1:3000:3000"
frontend:
image: node:22-alpine
working_dir: /app
command: sh -c "npm ci && npm run dev -- --host 0.0.0.0"
environment:
VITE_API_PROXY_TARGET: http://backend:3000
volumes:
- ./frontend:/app
- frontend_dev_node_modules:/app/node_modules
depends_on:
- backend
ports:
- "127.0.0.1:5173:5173"
docs:
image: node:22-alpine
profiles: ["docs"]
working_dir: /app
command: sh -c "apk add --no-cache git && npm ci && npm run start -- --host 0.0.0.0"
volumes:
- ./docs:/app
- docs_dev_node_modules:/app/node_modules
ports:
- "127.0.0.1:3001:3000"
volumes:
postgres_dev_data:
backend_dev_node_modules:
frontend_dev_node_modules:
docs_dev_node_modules: