ops: add docker-compose.yml and deploy-postgres.sh for production cutover

- docker-compose.yml: Postgres 16 Alpine on port 5433 with healthcheck
- scripts/deploy-postgres.sh: one-shot deployment script that handles
  container startup, schema creation, npm install, data migration, and
  frontend build
- Backup SQLite database as cve_database.db.pre-postgres-backup
This commit is contained in:
Jordan Ramos
2026-05-06 15:07:06 -06:00
parent 573903a885
commit 6163be626e
3 changed files with 144 additions and 0 deletions

26
docker-compose.yml Normal file
View File

@@ -0,0 +1,26 @@
# Docker Compose for CVE Dashboard PostgreSQL
# Run: docker compose up -d
# Stop: docker compose down
# View logs: docker compose logs -f postgres
services:
postgres:
image: postgres:16-alpine
container_name: steam-postgres
restart: unless-stopped
environment:
POSTGRES_DB: cve_dashboard
POSTGRES_USER: steam
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-sV4xmC9xAUCFop0ypxMVS056QgPqGrX}
ports:
- "5433:5432"
volumes:
- steam-pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U steam -d cve_dashboard"]
interval: 10s
timeout: 5s
retries: 5
volumes:
steam-pgdata: