# Alternative test infrastructure: ephemeral Postgres + Valkey containers. # # CURRENT DEFAULT is Option C (schema-isolated remote DB) because the dev role on # the remote DB cannot CREATE DATABASE. Use this docker-compose if you'd rather # run an isolated, throwaway test DB on your local machine. # # To switch to docker-compose: # 1. docker compose -f docker-compose.test.yml up -d # 2. In .env.test set: # TEST_DATABASE_URL=postgresql://test:test@localhost:55432/halobestie_test # TEST_DB_SCHEMA=public # TEST_VALKEY_URL=redis://localhost:56379/0 # 3. npm test # 4. docker compose -f docker-compose.test.yml down -v # # The non-default ports (55432, 56379) avoid clashing with any local Postgres/Redis. services: postgres-test: image: postgres:15-alpine environment: POSTGRES_USER: test POSTGRES_PASSWORD: test POSTGRES_DB: halobestie_test ports: - "55432:5432" tmpfs: - /var/lib/postgresql/data # ephemeral — wiped on container stop valkey-test: image: valkey/valkey:7-alpine ports: - "56379:6379" tmpfs: - /data