feat(docker): docker-compose.dev — backend+nginx, общий Postgres, миграции в entrypoint
Made-with: Cursor
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
# Система тестирования + общий 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
|
||||
Reference in New Issue
Block a user