38 lines
793 B
YAML
38 lines
793 B
YAML
services:
|
|
db:
|
|
image: postgres:16-alpine
|
|
restart: unless-stopped
|
|
environment:
|
|
POSTGRES_DB: payme
|
|
POSTGRES_USER: payme
|
|
POSTGRES_PASSWORD: payme
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
ports:
|
|
- "5432:5432"
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U payme -d payme"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
restart: unless-stopped
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
NODE_ENV: production
|
|
DATABASE_URL: postgresql://payme:payme@db:5432/payme?schema=public
|
|
NEXTAUTH_URL: http://localhost:3000
|
|
ports:
|
|
- "3000:3000"
|
|
|
|
volumes:
|
|
postgres_data:
|