-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
96 lines (94 loc) · 2.33 KB
/
docker-compose.dev.yml
File metadata and controls
96 lines (94 loc) · 2.33 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
services:
backend:
build:
context: ./backend
target: dev
env_file:
- ./backend/.env
volumes:
- ./backend:/app
- /app/node_modules
- db_data:/data
# store uploaded images in a separate named volume mounted at /data/images
- images_data:/data/images
ports:
- "4001:3001"
environment:
- NODE_ENV=development
# Store uploaded images on persistent docker volume
- IMAGE_STORAGE_PATH=/data/images
# Allow CORS from dev frontend port
- ALLOWED_ORIGIN=http://localhost:3003
# Optional: stabilize file watching inside container
- CHOKIDAR_USEPOLLING=1
# Persistence / DB (dev defaults)
# Use a named volume for SQLite database persistence
- PERSIST_TRANSCRIPTS=1
- DB_URL=file:/data/dev.db
restart: unless-stopped
networks:
- app
frontend:
build:
context: ./frontend
target: dev
args:
NEXT_PUBLIC_API_BASE: /api
BACKEND_ORIGIN: http://backend:3001
environment:
- NEXT_PUBLIC_API_BASE=/api
- BACKEND_ORIGIN=http://backend:3001
- NODE_ENV=development
# Improve file watching on macOS/WSL
- CHOKIDAR_USEPOLLING=1
- WATCHPACK_POLLING=true
volumes:
- ./frontend:/app
- /app/node_modules
depends_on:
- backend
restart: unless-stopped
networks:
- app
proxy:
image: nginx:1.27-alpine
init: true
depends_on:
frontend:
condition: service_started
backend:
condition: service_started
volumes:
- ./proxy/nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- "3003:80"
healthcheck:
test: ["CMD-SHELL", "wget --spider -q http://127.0.0.1/health || exit 1"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
restart: unless-stopped
networks:
- app
adminer:
image: adminer:latest
restart: unless-stopped
ports:
- "3080:8080"
environment:
# These make Adminer more permissive
ADMINER_DEFAULT_SERVER: "sqlite"
ADMINER_DESIGN: "nette"
user: 1000:1000
volumes:
- db_data:/data
- ./adminer_login-password-less.php:/var/www/html/plugins-enabled/login-password-less.php
networks:
app:
driver: bridge
volumes:
db_data:
driver: local
images_data:
driver: local