cleaning up npm packages

This commit is contained in:
C-West8
2026-07-22 15:54:59 -05:00
parent 4e6ed044a9
commit a0e6a32b5f
8 changed files with 338 additions and 216 deletions

View File

@@ -5,16 +5,22 @@ services:
db:
image: postgres:16-alpine
restart: unless-stopped
# Username / password / db name come from your .env (or the defaults below),
# so you change them in one place and both services stay in sync.
environment:
POSTGRES_USER: sde
POSTGRES_PASSWORD: sde_password
POSTGRES_DB: sde_toolkit
POSTGRES_USER: ${DB_USER:-sde}
POSTGRES_PASSWORD: ${DB_PASSWORD:-sde_password}
POSTGRES_DB: ${DB_NAME:-sde_toolkit}
# Publish the DB to the host so `npm run dev` (running outside Docker) can
# reach it. Host port comes from DB_PORT in .env; inside Docker it's 5432.
ports:
- "${DB_PORT:-5432}:5432"
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"]
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-sde} -d ${DB_NAME:-sde_toolkit}"]
interval: 5s
timeout: 5s
retries: 10
@@ -26,7 +32,12 @@ services:
db:
condition: service_healthy
environment:
DATABASE_URL: postgres://sde:sde_password@db:5432/sde_toolkit
# "db" is the hostname of the database service above, on the compose network.
DB_HOST: db
DB_PORT: 5432
DB_USER: ${DB_USER:-sde}
DB_PASSWORD: ${DB_PASSWORD:-sde_password}
DB_NAME: ${DB_NAME:-sde_toolkit}
PORT: 3000
ORIGIN: ${ORIGIN:-http://localhost:3000}
ports: