The NestJS API serves the public profile through Apollo Sandbox and loads only the relations selected by the query.
46 lines
948 B
YAML
46 lines
948 B
YAML
name: digital-card
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:17-alpine
|
|
environment:
|
|
POSTGRES_USER: card
|
|
POSTGRES_PASSWORD: card
|
|
POSTGRES_DB: card
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- card-postgres:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U card -d card"]
|
|
interval: 2s
|
|
timeout: 5s
|
|
retries: 30
|
|
|
|
api:
|
|
build: .
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
environment:
|
|
DATABASE_URL: postgresql://card:card@postgres:5432/card
|
|
PORT: 3000
|
|
NODE_ENV: production
|
|
ports:
|
|
- "3000:3000"
|
|
healthcheck:
|
|
test:
|
|
[
|
|
"CMD",
|
|
"node",
|
|
"-e",
|
|
"fetch('http://127.0.0.1:3000/health').then((r)=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))",
|
|
]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 20
|
|
start_period: 20s
|
|
|
|
volumes:
|
|
card-postgres:
|