Files
TestingWebApp/docker-compose.dev.yml
T
Константин Лебединский 42b5e9ad44 chore: API на хосте 3107 (согласовано с Vite proxy)
- compose: 3107:3107 вместо 3002:3107
- README: прямой URL API с хоста
- vite: комментарий про порт

Made-with: Cursor
2026-04-24 23:09:18 +05:00

54 lines
2.1 KiB
YAML
Raw 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.
# Система тестирования + общий 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
# LLM и прочие секреты из хоста (не копируются в образ — см. .dockerignore)
env_file:
- ./backend/.env
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
# Вход теми же учётками, что в HR: проверка пароля в hr_bot_test + привязка сотрудника по web_login.
# Без HR_AUTH / HR_DATABASE_URL логин ищется только в clinic_tests.users (локальные dev-учётки).
HR_AUTH: ${HR_AUTH:-1}
HR_DATABASE_URL: postgresql://hr_bot_user:hrbot123@hr_postgres_dev:5432/hr_bot_test
# С хоста API: localhost:3107 (то же, что в frontend/vite proxy на локальный dev)
ports:
- "3107:3107"
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