mirror of
https://github.com/AndersPier/v0-v0app.git
synced 2025-10-27 10:06:52 +00:00
Create Docker configuration files and setup commands #VERCEL_SKIP Co-authored-by: Anders Lehmann Pier <3219386+AndersPier@users.noreply.github.com>
49 lines
1018 B
YAML
49 lines
1018 B
YAML
version: '3.8'
|
|
|
|
services:
|
|
markdown-editor:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: markdown-editor-app
|
|
ports:
|
|
- "3000:3000"
|
|
environment:
|
|
- NODE_ENV=production
|
|
- NEXT_TELEMETRY_DISABLED=1
|
|
restart: unless-stopped
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"]
|
|
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
|