mirror of
https://github.com/AndersPier/v0-v0app.git
synced 2025-10-27 10:06:52 +00:00
feat: add complete Docker setup for markdown editor
Create Docker configuration files and setup commands #VERCEL_SKIP Co-authored-by: Anders Lehmann Pier <3219386+AndersPier@users.noreply.github.com>
This commit is contained in:
48
docker-compose.yml
Normal file
48
docker-compose.yml
Normal file
@@ -0,0 +1,48 @@
|
||||
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
|
||||
Reference in New Issue
Block a user