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", "wget", "--no-verbose", "--tries=1", "--spider", "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