# Throwaway PostgreSQL for the Netflox assignment database. # # The database name, user and port match the connection string hard-coded in # database.py (host=localhost dbname=NetfloxFinal user=postgres), so the # application and the tests run unmodified. # # The password comes from the environment and has no default: `docker compose` # refuses to start if NETFLOX_DB_PASSWORD is empty, and nothing is committed. # export NETFLOX_DB_PASSWORD=... # docker compose up -d --wait name: netflox services: db: image: postgres:16-alpine environment: POSTGRES_DB: NetfloxFinal POSTGRES_USER: postgres POSTGRES_PASSWORD: ${NETFLOX_DB_PASSWORD:?set NETFLOX_DB_PASSWORD (see README, Requirements)} ports: - "127.0.0.1:5432:5432" healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres -d NetfloxFinal"] interval: 2s timeout: 3s retries: 30 volumes: - pgdata:/var/lib/postgresql/data volumes: pgdata: