1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00
Files
AdministrationItDepartmens/docker-compose.test.yml
2025-01-04 02:19:41 +06:00

42 lines
1.1 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

version: '3.8'
services:
test-db:
image: postgres:13
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: support_test
ports:
- "5433:5432" # Используем другой порт, чтобы не конфликтовать с основной БД
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
test-redis:
image: redis:alpine
ports:
- "6380:6379" # Используем другой порт, чтобы не конфликтовать с основным Redis
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
backend-tests:
build:
context: ./backend
dockerfile: Dockerfile.test
environment:
DATABASE_URL: postgresql://postgres:postgres@test-db:5432/support_test
REDIS_URL: redis://test-redis:6379/0
depends_on:
test-db:
condition: service_healthy
test-redis:
condition: service_healthy
volumes:
- ./backend:/app
- ./test-results:/app/test-results