-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.test.yml
More file actions
31 lines (30 loc) · 946 Bytes
/
Copy pathdocker-compose.test.yml
File metadata and controls
31 lines (30 loc) · 946 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Izolowany stack TYLKO do testów e2e — efemeryczny (dane w tmpfs, znikają po `down`).
# Inne porty niż dev/produkcja, żeby nie kolidować z lokalnym Postgresem/Redisem
# ani nie dotknąć Supabase. Uruchom: `docker compose -f docker-compose.test.yml up -d --wait`
services:
postgres-test:
image: postgres:16-alpine
container_name: bank-postgres-test
environment:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: bank_test
ports:
- "5433:5432"
tmpfs:
- /var/lib/postgresql/data # baza w RAM — szybkie, czyste przy restarcie
healthcheck:
test: ["CMD-SHELL", "pg_isready -U test -d bank_test"]
interval: 3s
timeout: 3s
retries: 20
redis-test:
image: redis:7-alpine
container_name: bank-redis-test
ports:
- "6380:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 3s
timeout: 3s
retries: 20