fix(deploy): isolate demo settings and monitoring

This commit is contained in:
TakuyaYagam1 committed 2026-10-11 22:59:34 +03:00
1 parent 6dd5a0d54a
commit 6d6aa9ffe8
7 files changed
+331 -36

No files matched your search

+3 -2
View File
@@ -75,10 +75,11 @@ Templates and rendering live in `backend/internal/usecase/notification/mailtempl
```sh
make -C deploy demo-seed DEMO_MODE=isolated
make -C deploy monitoring-up DEMO_MODE=isolated
make -C deploy monitoring-down DEMO_MODE=isolated
make -C deploy demo-down DEMO_MODE=isolated
```
The seed creates a separate `lincodex-demo` project, bank, and synthetic accounts; repeated runs are idempotent. The local frontend is available at `http://localhost:8090`; you do not need to pass `APP_HTTP_BIND` on the command line. The target uses the root `.env` and `deploy/demo/demo.env`, falling back to the public example if the latter is absent. The command prints logins; `DEMO_ACCOUNT_PASSWORD` sets their password. For external access, choose your own password and share it separately with participants.
The seed creates a separate `lincodex-demo` project, bank, and synthetic accounts; repeated runs are idempotent. The local frontend is available at `http://localhost:8090`; you do not need to pass `APP_HTTP_BIND` on the command line. Settings load in this order: the root `.env`, `deploy/demo/demo.env.example`, then local `deploy/demo/demo.env` if it exists. Copy the example to `demo.env` to set local values; without that file, the example provides the defaults. The command prints logins; `DEMO_ACCOUNT_PASSWORD` sets their password. For external access, choose your own password and share it separately with participants.
The guide is at `/demo`. Main accounts: `candidate@demo.lincodex.test`, `prepared-1@demo.lincodex.test` through `prepared-6@demo.lincodex.test`, `employer-alpha@demo.lincodex.test`, and `employer-beta@demo.lincodex.test`. Follow the candidate from assessment to result, then send an invitation as the employer and accept it as the candidate with selected contacts.
@@ -170,7 +171,7 @@ make -C deploy monitoring-logs
make -C deploy monitoring-down
```
By default, the project joins the core network. After starting the demo, run `make -C deploy monitoring-up DEMO_MODE=isolated` to connect it to the `lincodex-demo` network. Grafana is bound to loopback; Prometheus, Loki, Alloy, and exporters remain internal. Dashboards cover Go, PostgreSQL, Redis, SeaweedFS, the host, and product metrics. Kafka has no dedicated scrape yet. The React telemetry SDK is not connected. Alert rules exist; notification delivery needs separate configuration.
By default, the project joins the core network. After starting the demo, run `make -C deploy monitoring-up DEMO_MODE=isolated` to connect it to the `lincodex-demo` network. Demo Grafana is available by default at `http://localhost:3001`; set `DEMO_GRAFANA_PORT` to change the port. Stop this monitoring project with `make -C deploy monitoring-down DEMO_MODE=isolated`. Grafana is bound to loopback; Prometheus, Loki, Alloy, and exporters remain internal. Dashboards cover Go, PostgreSQL, Redis, SeaweedFS, the host, and product metrics. Kafka has no dedicated scrape yet. The React telemetry SDK is not connected. Alert rules exist; notification delivery needs separate configuration.
Prometheus retains metrics for 14 days with a 4 GB cap; Loki retains logs for 7 days. Keep contacts, resumes, raw URLs, and user identifiers out of labels. Alloy accesses the Docker API through a restricted socket proxy; even read-only Docker API access can expose sensitive container configuration. Treat this component as privileged.
+3 -2
View File
@@ -75,10 +75,11 @@ Resend отправляет подтверждение адреса и подд
```sh
make -C deploy demo-seed DEMO_MODE=isolated
make -C deploy monitoring-up DEMO_MODE=isolated
make -C deploy monitoring-down DEMO_MODE=isolated
make -C deploy demo-down DEMO_MODE=isolated
```
Seed создает отдельный проект `lincodex-demo`, банк и аккаунты с синтетическими данными; повторный запуск идемпотентен. Локальный frontend доступен на `http://localhost:8090`; передавать `APP_HTTP_BIND` в командной строке не нужно. Цель использует корневой `.env` и `deploy/demo/demo.env`, а при отсутствии последнего - публичный пример. Логины печатает команда, пароль задает `DEMO_ACCOUNT_PASSWORD`. Для внешнего доступа выберите свой пароль и передайте его участникам отдельно.
Seed создает отдельный проект `lincodex-demo`, банк и аккаунты с синтетическими данными; повторный запуск идемпотентен. Локальный frontend доступен на `http://localhost:8090`; передавать `APP_HTTP_BIND` в командной строке не нужно. Настройки загружаются по порядку: корневой `.env`, `deploy/demo/demo.env.example`, затем локальный `deploy/demo/demo.env`, если он существует. Скопируйте пример в `demo.env`, чтобы задать свои значения; без него используются значения примера. Логины печатает команда, пароль задает `DEMO_ACCOUNT_PASSWORD`. Для внешнего доступа выберите свой пароль и передайте его участникам отдельно.
Гид находится на `/demo`. Основные аккаунты: `candidate@demo.lincodex.test`, `prepared-1@demo.lincodex.test` - `prepared-6@demo.lincodex.test`, `employer-alpha@demo.lincodex.test` и `employer-beta@demo.lincodex.test`. Пройдите путь кандидата от теста до результата, затем от работодателя отправьте приглашение и примите его кандидатом с выбранными контактами.
@@ -170,7 +171,7 @@ make -C deploy monitoring-logs
make -C deploy monitoring-down
```
По умолчанию проект подключается к сети core. После запуска демо используйте `make -C deploy monitoring-up DEMO_MODE=isolated`, чтобы подключить его к сети `lincodex-demo`. Grafana доступна только на loopback; Prometheus, Loki, Alloy и exporters остаются внутри. Дашборды охватывают Go, PostgreSQL, Redis, SeaweedFS, хост и продуктовые метрики. Kafka пока не имеет собственного scrape. React SDK телеметрии пока не подключен. Alert rules есть, доставка уведомлений требует отдельной настройки.
По умолчанию проект подключается к сети core. После запуска демо используйте `make -C deploy monitoring-up DEMO_MODE=isolated`, чтобы подключить его к сети `lincodex-demo`. Grafana демостенда по умолчанию доступна на `http://localhost:3001`; порт задает `DEMO_GRAFANA_PORT`. Остановите этот monitoring-проект командой `make -C deploy monitoring-down DEMO_MODE=isolated`. Grafana доступна только на loopback; Prometheus, Loki, Alloy и exporters остаются внутри. Дашборды охватывают Go, PostgreSQL, Redis, SeaweedFS, хост и продуктовые метрики. Kafka пока не имеет собственного scrape. React SDK телеметрии пока не подключен. Alert rules есть, доставка уведомлений требует отдельной настройки.
Prometheus хранит метрики 14 дней с пределом 4 GB, Loki - логи 7 дней. В labels нельзя добавлять контакты, резюме, сырые URL или идентификаторы пользователей. Alloy получает Docker API через ограниченный socket proxy; даже read-only доступ к Docker API позволяет читать чувствительную конфигурацию контейнеров. Считайте этот контур привилегированным.