services: web: build: context: . dockerfile: Dockerfile image: rotary-club-vellore:latest container_name: rotary-club-vellore restart: unless-stopped ports: - "9022:3000" environment: - NODE_ENV=production - DATA_DIR=/app/data # Admin panel login (/admin). Set these in a .env file next to this compose file. - ADMIN_USERNAME=${ADMIN_USERNAME} - ADMIN_PASSWORD=${ADMIN_PASSWORD} - ADMIN_SECRET=${ADMIN_SECRET} volumes: # keeps gallery / meeting / events edits and uploaded photos across rebuilds - rotary-data:/app/data # healthcheck: hits the site root to confirm the container is actually serving healthcheck: test: ["CMD", "wget", "--spider", "-q", "http://localhost:3000"] interval: 30s timeout: 5s retries: 3 start_period: 10s # Optional: run with hot-reload for local development instead of the prod image. # Usage: docker compose --profile dev up web-dev web-dev: profiles: ["dev"] image: node:20-alpine working_dir: /app command: sh -c "npm ci && npm run dev" ports: - "3000:3000" environment: - NODE_ENV=development - NEXT_TELEMETRY_DISABLED=1 volumes: - .:/app - /app/node_modules - /app/.next volumes: rotary-data: