- Added CORS allowed origins in config.compose.yaml to enable cross-origin requests from the web service. - Updated docker-compose.yml to include a new web service with build context and port mapping for local development. - Enhanced gateway.go to support additional HTTP methods in CORS responses. - Updated README.md to document the new web service and its configuration requirements.
23 lines
783 B
YAML
23 lines
783 B
YAML
services:
|
|
web:
|
|
build:
|
|
context: ./web
|
|
dockerfile: Dockerfile
|
|
args:
|
|
# URL шлюза в браузере (встраивается при сборке)
|
|
PUBLIC_TELEMT_GATEWAY_URL: http://127.0.0.1:8080
|
|
ports:
|
|
- "4173:4173"
|
|
gateway:
|
|
image: git.shts.su/denozord/telemt-api:latest
|
|
# Локальная сборка вместо pull: укажите build: . и image: telemt-api-gateway:local
|
|
ports:
|
|
- "8080:8080"
|
|
volumes:
|
|
- ./config.compose.yaml:/etc/telemt-gateway/config.yaml:ro
|
|
environment:
|
|
CONFIG_PATH: /etc/telemt-gateway/config.yaml
|
|
# Доступ к Telemt на хосте Linux (host.docker.internal в config.compose.yaml):
|
|
extra_hosts:
|
|
- "host.docker.internal:host-gateway"
|