Files
nick-sde-value-driver-website/docker-compose.yml

37 lines
916 B
YAML

# One command to run the whole thing internally: docker compose up -d
# The app comes up on http://<host>:3000
services:
db:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_USER: sde
POSTGRES_PASSWORD: sde_password
POSTGRES_DB: sde_toolkit
volumes:
- db_data:/var/lib/postgresql/data
# Runs once on first startup to create the schema.
- ./db/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U sde -d sde_toolkit"]
interval: 5s
timeout: 5s
retries: 10
app:
build: .
restart: unless-stopped
depends_on:
db:
condition: service_healthy
environment:
DATABASE_URL: postgres://sde:sde_password@db:5432/sde_toolkit
PORT: 3000
ORIGIN: ${ORIGIN:-http://localhost:3000}
ports:
- "3000:3000"
volumes:
db_data: