2025-06-19 21:46:26 +00:00
|
|
|
services:
|
|
|
|
|
markdown-editor:
|
|
|
|
|
build:
|
|
|
|
|
context: .
|
|
|
|
|
dockerfile: Dockerfile
|
|
|
|
|
container_name: markdown-editor-app
|
2025-06-19 23:54:28 +02:00
|
|
|
#ports:
|
|
|
|
|
# - "3000:3000"
|
2025-06-19 21:46:26 +00:00
|
|
|
environment:
|
|
|
|
|
- NODE_ENV=production
|
|
|
|
|
- NEXT_TELEMETRY_DISABLED=1
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
healthcheck:
|
2025-06-19 21:53:56 +00:00
|
|
|
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/api/health"]
|
2025-06-19 21:46:26 +00:00
|
|
|
interval: 30s
|
|
|
|
|
timeout: 10s
|
|
|
|
|
retries: 3
|
|
|
|
|
start_period: 40s
|
|
|
|
|
networks:
|
|
|
|
|
- markdown-editor-network
|
|
|
|
|
|
|
|
|
|
# Optional: Add a reverse proxy (nginx) for production
|
|
|
|
|
nginx:
|
|
|
|
|
image: nginx:alpine
|
|
|
|
|
container_name: markdown-editor-nginx
|
|
|
|
|
ports:
|
|
|
|
|
- "80:80"
|
|
|
|
|
- "443:443"
|
|
|
|
|
volumes:
|
|
|
|
|
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
|
|
|
|
- ./ssl:/etc/nginx/ssl:ro
|
|
|
|
|
depends_on:
|
|
|
|
|
- markdown-editor
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
networks:
|
|
|
|
|
- markdown-editor-network
|
|
|
|
|
profiles:
|
|
|
|
|
- production
|
|
|
|
|
|
|
|
|
|
networks:
|
|
|
|
|
markdown-editor-network:
|
|
|
|
|
driver: bridge
|
|
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
markdown-editor-data:
|
|
|
|
|
driver: local
|