mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-22 07:32:32 +01:00
25 lines
736 B
YAML
25 lines
736 B
YAML
# Docker Compose configuration for running integration tests
|
|
# Usage: docker-compose -f docker/docker-compose.test.yml up -d
|
|
services:
|
|
test-db:
|
|
image: postgres:15-alpine
|
|
container_name: erupe-test-db
|
|
environment:
|
|
POSTGRES_USER: test
|
|
POSTGRES_PASSWORD: test
|
|
POSTGRES_DB: erupe_test
|
|
ports:
|
|
- "5433:5432" # Different port to avoid conflicts with main DB
|
|
# Use tmpfs for faster tests (in-memory database)
|
|
tmpfs:
|
|
- /var/lib/postgresql/data
|
|
# Mount schema files for initialization
|
|
volumes:
|
|
- ../schemas/:/schemas/
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U test -d erupe_test"]
|
|
interval: 2s
|
|
timeout: 2s
|
|
retries: 10
|
|
start_period: 5s
|