-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
37 lines (34 loc) · 882 Bytes
/
docker-compose.yml
File metadata and controls
37 lines (34 loc) · 882 Bytes
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
version: '3.8'
services:
app:
build:
context: .
dockerfile: Dockerfile
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- MONGODB_URI=${MONGODB_URI:-}
- NEXT_PUBLIC_OPENROUTESERVICE_API_KEY=${NEXT_PUBLIC_OPENROUTESERVICE_API_KEY:-}
volumes:
- ./public:/app/public
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost:3000"]
interval: 30s
timeout: 3s
retries: 3
start_period: 5s
# Optional: MongoDB container (uncomment if needed)
# mongodb:
# image: mongo:7
# ports:
# - "27017:27017"
# environment:
# MONGO_INITDB_ROOT_USERNAME: root
# MONGO_INITDB_ROOT_PASSWORD: password
# volumes:
# - mongodb_data:/data/db
# restart: unless-stopped
# volumes:
# mongodb_data: