name: otp-share services: app: build: context: . init: true restart: unless-stopped environment: NODE_ENV: production REDIS_URL: redis://redis:6379 NEXT_TELEMETRY_DISABLED: "1" ports: - "${PORT:-3000}:3000" depends_on: redis: condition: service_healthy healthcheck: test: - CMD - node - -e - "fetch('http://127.0.0.1:3000').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))" interval: 10s timeout: 5s retries: 5 start_period: 20s redis: image: redis:7.4-alpine init: true restart: unless-stopped command: - redis-server - --save - "" - --appendonly - "no" - --maxmemory - 128mb - --maxmemory-policy - volatile-ttl healthcheck: test: ["CMD", "redis-cli", "ping"] interval: 5s timeout: 3s retries: 10 tmpfs: - /data:size=16m,mode=1777 expose: - "6379"