Files
mtusi2026lab3/compose.test.yaml
T
2026-11-01 13:37:02 +03:00

35 lines
842 B
YAML

name: messenger-lab3-test
services:
postgres:
image: postgres:17.2-alpine
environment:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: messenger_test
tmpfs:
- /var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "test", "-d", "messenger_test"]
interval: 2s
timeout: 3s
retries: 15
redis:
image: redis:7.4.1-alpine
command: ["redis-server", "--save", "", "--appendonly", "no"]
tests:
build:
context: .
target: test
image: mtusi-messenger-lab3-test:dev
environment:
DATABASE_URL: postgresql://test:test@postgres:5432/messenger_test?connection_limit=20
CACHE_URL: redis://redis:6379/0
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started