493f6ab7fc
pg_isready healthchecks broken server-wide (root_db, hoppscotch-db also unhealthy). Remove healthcheck block, depend on service_started only. migrate sleeps 5s to give postgres time to accept connections. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
47 lines
1.2 KiB
YAML
47 lines
1.2 KiB
YAML
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: grow
|
|
POSTGRES_USER: grow
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme}
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
app:
|
|
build: .
|
|
restart: unless-stopped
|
|
depends_on:
|
|
- db
|
|
ports:
|
|
- "${PORT:-3000}:3000"
|
|
environment:
|
|
DATABASE_URL: "postgresql://grow:${POSTGRES_PASSWORD}@db:5432/grow"
|
|
NEXTAUTH_URL: ${NEXTAUTH_URL}
|
|
AUTH_SECRET: ${AUTH_SECRET}
|
|
SUPERADMIN_EMAIL: ${SUPERADMIN_EMAIL}
|
|
# Optional
|
|
SMTP_HOST: ${SMTP_HOST:-}
|
|
SMTP_PORT: ${SMTP_PORT:-587}
|
|
SMTP_USER: ${SMTP_USER:-}
|
|
SMTP_PASS: ${SMTP_PASS:-}
|
|
SMTP_FROM: ${SMTP_FROM:-}
|
|
PUSHOVER_APP_TOKEN: ${PUSHOVER_APP_TOKEN:-}
|
|
VAPID_PUBLIC_KEY: ${VAPID_PUBLIC_KEY:-}
|
|
VAPID_PRIVATE_KEY: ${VAPID_PRIVATE_KEY:-}
|
|
VAPID_SUBJECT: ${VAPID_SUBJECT:-}
|
|
|
|
migrate:
|
|
build:
|
|
context: .
|
|
target: builder
|
|
command: sh -c "sleep 5 && node_modules/.bin/prisma db push"
|
|
depends_on:
|
|
- db
|
|
environment:
|
|
DATABASE_URL: "postgresql://grow:${POSTGRES_PASSWORD}@db:5432/grow"
|
|
restart: "no"
|
|
|
|
volumes:
|
|
postgres_data:
|