Files
nuchat/docker-compose.yml

45 lines
903 B
YAML

services:
ui:
build: ./ui
ports:
- "3000:3000"
depends_on:
backend:
condition: service_started
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://0.0.0.0:3000"]
interval: 1s
retries: 3
timeout: 5s
backend:
build: ./backend
ports:
- "7000:7000"
depends_on:
db:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:7000/healthcheck"]
interval: 1s
retries: 3
timeout: 5s
db:
image: postgres:17-alpine
restart: unless-stopped
ports:
- "5432:5432"
environment:
POSTGRES_DB: nuchat
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d nuchat"]
interval: 1s
retries: 3
timeout: 5s
volumes:
- db-data:/var/lib/postgresql/data
volumes:
db-data: