services: db: image: postgres:16-alpine restart: unless-stopped environment: POSTGRES_USER: edueasy POSTGRES_PASSWORD: edueasy_pass POSTGRES_DB: edueasy volumes: - pgdata:/var/lib/postgresql/data ports: - "5432:5432" healthcheck: test: ["CMD-SHELL", "pg_isready -U edueasy -d edueasy"] interval: 5s timeout: 3s retries: 10 app: build: . restart: unless-stopped depends_on: db: condition: service_healthy environment: DATABASE_URL: "postgresql://edueasy:edueasy_pass@db:5432/edueasy?schema=public" NEXTAUTH_SECRET: "change-me-in-production" NODE_ENV: production PORT: 3000 HOSTNAME: 0.0.0.0 ports: - "3000:3000" command: sh -c "npx prisma db push --skip-generate && node server.js" volumes: pgdata: