services: app: build: context: . dockerfile: Dockerfile ports: - "3000:3000" environment: - DATABASE_URL=postgresql://postgres:postgres@db:5432/timepickr?schema=public - NEXT_PUBLIC_APP_URL=http://localhost:3000 depends_on: db: condition: service_healthy restart: unless-stopped db: image: postgres:16-alpine ports: - "5432:5432" environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres - POSTGRES_DB=timepickr volumes: - postgres_data:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s timeout: 5s retries: 5 restart: unless-stopped # Migration runner - runs once and exits migrate: build: context: . dockerfile: Dockerfile.migrate environment: - DATABASE_URL=postgresql://postgres:postgres@db:5432/timepickr?schema=public depends_on: db: condition: service_healthy volumes: postgres_data: