mirror of
https://github.com/Mezeporta/Erupe.git
synced 2026-03-22 15:43:49 +01:00
feat(docker): backports docker configuration from main for testing.
This commit is contained in:
24
docker/docker-compose.test.yml
Normal file
24
docker/docker-compose.test.yml
Normal file
@@ -0,0 +1,24 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user