ВМ1: реализован сбор логов

This commit is contained in:
mi
2026-09-07 12:46:45 +03:00
parent 44db38f6fe
commit 85df788f2d
42 changed files with 1669 additions and 310 deletions
@@ -29,7 +29,7 @@ x-api-secrets: &api-secrets
x-api-runtime: &api-runtime
image: ${API_BACKEND_IMAGE:?API_BACKEND_IMAGE must be pinned by digest}
environment:
environment: &api-environment
<<: *api-secret-environment
APP_ENV: ${APP_ENV:-production-like}
LOG_LEVEL: ${LOG_LEVEL:-INFO}
@@ -167,6 +167,8 @@ services:
KC_HTTP_RELATIVE_PATH: /auth
KC_HEALTH_ENABLED: "true"
KC_METRICS_ENABLED: "true"
KC_LOG_CONSOLE_OUTPUT: json
KC_LOG_LEVEL: ${KEYCLOAK_LOG_LEVEL:-info}
KC_HOSTNAME: ${KEYCLOAK_PUBLIC_URL}
PUBLIC_WEB_URL: ${PUBLIC_WEB_URL:?PUBLIC_WEB_URL is required for realm import}
KC_BOOTSTRAP_ADMIN_USERNAME: ${KEYCLOAK_ADMIN}
@@ -185,6 +187,8 @@ services:
- keycloak_settings_bridge_token
- keycloak_sms_service_token
command: ["start", "--optimized", "--import-realm"]
labels:
com.han.service.name: keycloak
expose: ["8080", "9000"]
volumes:
- type: bind
@@ -209,7 +213,10 @@ services:
core: {soft: 0, hard: 0}
logging:
driver: json-file
options: {max-size: "50m", max-file: "5"}
options:
max-size: "50m"
max-file: "5"
tag: keycloak
sms-service:
<<: *sms-runtime
@@ -269,6 +276,9 @@ services:
delivery-worker:
<<: *api-runtime
command: ["han-delivery-worker"]
environment:
<<: *api-environment
OTEL_SERVICE_NAME: delivery-worker
depends_on:
api-backend: {condition: service_healthy}
bitrix-local-app: {condition: service_healthy}
@@ -283,6 +293,9 @@ services:
safety-recovery-worker:
<<: *api-runtime
command: ["han-safety-worker"]
environment:
<<: *api-environment
OTEL_SERVICE_NAME: safety-recovery-worker
depends_on:
api-backend: {condition: service_healthy}
healthcheck:
@@ -296,6 +309,9 @@ services:
cleanup-worker:
<<: *api-runtime
command: ["han-cleanup-worker"]
environment:
<<: *api-environment
OTEL_SERVICE_NAME: cleanup-worker
depends_on:
api-backend: {condition: service_healthy}
healthcheck:
@@ -309,6 +325,9 @@ services:
notification-expire-worker:
<<: *api-runtime
command: ["han-notification-expire-worker"]
environment:
<<: *api-environment
OTEL_SERVICE_NAME: notification-expire-worker
depends_on:
api-backend: {condition: service_healthy}
healthcheck:
@@ -322,6 +341,9 @@ services:
notification-draft-cleanup-worker:
<<: *api-runtime
command: ["han-notification-draft-cleanup-worker"]
environment:
<<: *api-environment
OTEL_SERVICE_NAME: notification-draft-cleanup-worker
depends_on:
api-backend: {condition: service_healthy}
healthcheck:
@@ -346,6 +368,10 @@ services:
BITRIX_API_FORWARD_TOKEN_FILE: /run/secrets/bitrix_api_forward_token
BITRIX_TOKEN_ENCRYPTION_KEY_FILE: /run/secrets/bitrix_token_encryption_key
APP_ENV: ${APP_ENV:-production-like}
LOG_LEVEL: ${LOG_LEVEL:-INFO}
RELEASE_VERSION: ${RELEASE_VERSION:-unknown}
OTEL_EXPORTER_OTLP_ENDPOINT: ${OTEL_EXPORTER_OTLP_ENDPOINT:-http://otel-collector:4317}
OTEL_SERVICE_NAME: bitrix-local-app
BITRIX_CLIENT_ID: ${BITRIX_CLIENT_ID}
BITRIX_CONNECTOR_ID: ${BITRIX_CONNECTOR_ID:-han_mobile_app}
BITRIX_CONNECTOR_NAME: ${BITRIX_CONNECTOR_NAME:-HAN Mobile App}