Update README.md to enhance web service documentation and local development instructions
Publish telemt-api gateway Docker image / test (push) Successful in 24s
Publish telemt-api gateway Docker image / build-and-push (push) Successful in 27s

- Clarified the process for pulling the gateway image and building the web service from the `web/` directory.
- Added details about accessing the gateway and Web UI, including CORS configuration for local development.
- Included instructions for running the web service locally without Docker, emphasizing the setup of environment variables and CORS settings.
This commit is contained in:
Denozordec
2026-03-30 10:33:52 +07:00
parent ef98560e9f
commit 6421a9b28d
+26 -2
View File
@@ -36,15 +36,39 @@ curl -sS http://127.0.0.1:8080/api/main_srv/health
### Compose
Тот же образ подтягивается из registry (без локальной сборки):
Тот же образ шлюза подтягивается из registry (без локальной сборки). Сервис **web** (панель в браузере) собирается из каталога `web/` при первом запуске:
```bash
git clone <url-репозитория> && cd telemt-api
docker compose pull
docker compose up -d
docker compose up -d --build
docker compose logs -f gateway
```
- Шлюз: `http://127.0.0.1:8080` (проверка: `curl -sS http://127.0.0.1:8080/health`).
- Web UI: `http://127.0.0.1:4173` — в [config.compose.yaml](config.compose.yaml) заданы `cors_allowed_origins` под этот origin; `PUBLIC_TELEMT_GATEWAY_URL` при сборке образа UI указывает на шлюз на хосте (`http://127.0.0.1:8080`).
Подробнее по панели: [web/README.md](web/README.md).
### Web UI (локально без Docker)
Если шлюз уже запущен (например на `http://127.0.0.1:8080`):
```bash
cd web
cp .env.example .env
# при необходимости отредактируйте PUBLIC_TELEMT_GATEWAY_URL
npm install
npm run dev
```
Откройте адрес Vite (обычно `http://localhost:5173`). В конфиге шлюза добавьте [CORS](docs/AGGREGATE.md), например:
```yaml
cors_allowed_origins:
- "http://localhost:5173"
```
### Локальная сборка образа
Если нужен образ из исходников на этой машине: `docker build -t telemt-api-gateway:local .` и в `docker run` укажите тег `telemt-api-gateway:local`. Подробнее — [docs/GATEWAY_RUN.md](docs/GATEWAY_RUN.md).