# Production Docker Compose for Pantry App # # This compose file only runs the Nuxt frontend. # Supabase should be hosted separately (managed service or self-hosted). version: '3.8' services: app: build: context: . dockerfile: Dockerfile image: pantry:latest container_name: pantry-app restart: unless-stopped ports: - "3000:3000" environment: # Supabase connection (REQUIRED - set these in .env.production) NUXT_PUBLIC_SUPABASE_URL: ${NUXT_PUBLIC_SUPABASE_URL} NUXT_PUBLIC_SUPABASE_ANON_KEY: ${NUXT_PUBLIC_SUPABASE_ANON_KEY} # Server configuration NODE_ENV: production HOST: 0.0.0.0 PORT: 3000 healthcheck: test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/api/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"] interval: 30s timeout: 3s start_period: 40s retries: 3 networks: - pantry # Resource limits (adjust based on your needs) deploy: resources: limits: memory: 512M cpus: '1.0' reservations: memory: 256M cpus: '0.5' networks: pantry: driver: bridge