services: db: image: postgres:16-alpine container_name: otonotif-db environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: otonotif ports: - "127.0.0.1:5432:5432" volumes: - otonotif-pgdata:/var/lib/postgresql/data restart: unless-stopped networks: - default healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres -d otonotif"] interval: 5s timeout: 5s retries: 5 logging: driver: "json-file" options: max-size: "10m" max-file: "3" web: build: context: . dockerfile: dockerfile image: ${DOCKER_IMAGE_NAME:-nasgunawan/otonotif-app:latest} container_name: otonotif-web expose: - "3000" depends_on: db: condition: service_healthy env_file: - path: .env required: false - path: .env.local required: false environment: - PORT=3000 - HOSTNAME=0.0.0.0 - NODE_ENV=production - NEXT_TELEMETRY_DISABLED=1 - DATABASE_URL=postgres://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-otonotif} - BETTER_AUTH_SECRET - BETTER_AUTH_URL - GOOGLE_CLIENT_ID - GOOGLE_CLIENT_SECRET restart: unless-stopped networks: - default - proxy-net logging: driver: "json-file" options: max-size: "10m" max-file: "3" volumes: otonotif-pgdata: networks: proxy-net: external: true