Files
Erupe/docker/docker-compose.test.yml
Houmgaor 160130e464 refactor(docker): improve Docker setup and reduce image size
- Add multi-stage build to Dockerfile for smaller production image
- Move docker-compose.yml to project root for easier usage
- Flatten docker/init/setup.sh to docker/setup.sh
- Expand .dockerignore to exclude unnecessary files
- Remove deprecated version field from compose files
2026-02-01 23:49:52 +01:00

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