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:
26
docker-compose.yml
Normal file
26
docker-compose.yml
Normal 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:
|
||||
Reference in New Issue
Block a user