You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.5 KiB

# Система тестирования + общий Postgres (Postgres_TG_Bots / hr_postgres_dev).
# Требуется: сеть hr_postgres_dev_net и поднятый hr_postgres_dev.
# cd ../Postgres_TG_Bots && docker compose -f docker-compose.dev.yml up -d
# База clinic_tests: один раз
# psql "postgresql://hr_bot_user:hrbot123@localhost:5432/postgres" -c "CREATE DATABASE clinic_tests;"
#
# Запуск: из каталога TestingWebApp
# docker compose -f docker-compose.dev.yml up --build
# UI: http://localhost:8080 ( /api → backend )
services:
testing-backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: testing_webapp_backend
environment:
DATABASE_URL: postgresql://hr_bot_user:hrbot123@hr_postgres_dev:5432/clinic_tests
JWT_SECRET: ${JWT_SECRET:-testing_webapp_jwt_dev}
# development: httpOnly-cookie без Secure (иначе на http://localhost:8080 логин не сработает)
NODE_ENV: development
FRONTEND_URL: http://localhost:8080
# На хосте 3002, если 3001 занят локальным dev-сервером
ports:
- "3002:3001"
networks:
- app
- postgres
testing-web:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: testing_webapp_nginx
depends_on:
- testing-backend
ports:
- "8080:80"
networks:
- app
networks:
app:
postgres:
name: hr_postgres_dev_net
external: true