-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
44 lines (42 loc) · 1.1 KB
/
docker-compose.yml
File metadata and controls
44 lines (42 loc) · 1.1 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
version: '3.8'
services:
app:
build:
context: .
dockerfile: Dockerfile
ports:
- "3000:3000" # HTTP
- "3001:3001" # HTTPS
environment:
- NODE_ENV=production
- PORT=3000
- PORT_SSL=3001
- HOST=0.0.0.0
volumes:
- ./config:/app/config:ro # Mount config directory as read-only
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Development configuration
citizenos-fe:
build:
context: .
dockerfile: Dockerfile
target: builder # Use the builder stage for development
ports:
- "3000:3000"
- "3001:3001"
environment:
- NODE_ENV=development
- PORT=3000
- PORT_SSL=3001
- HOST=0.0.0.0
volumes:
- .:/app # Mount entire project for development
- /app/node_modules # Preserve node_modules in container
command: npm run dev # Using the correct dev script from package.json
restart: unless-stopped