mirror of
https://github.com/iamxvbaba/gramsrv.git
synced 2026-11-16 19:22:39 +03:00
b551a239f5
Translate all natural-language comments, log/diagnostic messages, SQL comments and config/doc prose from Chinese (and Russian) to English across the codebase (~840 files). Rebased on upstream main; upstream's newly added files are translated too. Locale resources and functional non-English data are left intact: language packs, admin/grammystore i18n bundles, localized docs, the officialBrandRE regex, seeded Russian premium-bot text, user-facing Russian bot strings and asserted Unicode test fixtures. A new internal/translation guard test fails if CJK/Cyrillic reappears in source outside that allowlist. No code, identifiers, struct tags or behavior changed (verified with an AST-level comment/string audit). go build ./..., go vet ./... and the guard pass.
76 lines
2.6 KiB
YAML
76 lines
2.6 KiB
YAML
# telesrv phase-1 third-party dependencies (for development).
|
|
#
|
|
# Start: docker compose up -d
|
|
# Status: docker compose ps
|
|
# Stop: docker compose down (keeps data volumes)
|
|
# Reset: docker compose down -v (deletes data volumes too, resetting schema/data)
|
|
#
|
|
# main / v2 use telesrv_main / telesrv_v2 respectively; the legacy telesrv database is
|
|
# kept only for compatibility and manual migration.
|
|
# The server-side connection strings use each branch's defaults in internal/config/config.go
|
|
# (localhost:5432 / localhost:6399).
|
|
name: telesrv
|
|
|
|
services:
|
|
postgres:
|
|
image: postgres:17-alpine
|
|
container_name: telesrv-postgres
|
|
# The whole database is de-partitioned (ordinary tables); the default
|
|
# max_locks_per_transaction of 64 is enough; 512 just leaves headroom at near-zero
|
|
# memory cost.
|
|
# pg_stat_statements: aggregates each SQL's cumulative/average duration and call
|
|
# count, to locate postgres-container CPU hotspots (telesrv is a host process, so
|
|
# the CPU spikes in docker stats are this container). A view exists only after
|
|
# CREATE EXTENSION:
|
|
# docker exec -i telesrv-postgres psql -U telesrv -d telesrv -c "CREATE EXTENSION IF NOT EXISTS pg_stat_statements;"
|
|
command:
|
|
- "postgres"
|
|
- "-c"
|
|
- "max_locks_per_transaction=512"
|
|
- "-c"
|
|
- "shared_preload_libraries=pg_stat_statements"
|
|
- "-c"
|
|
- "pg_stat_statements.track=all"
|
|
- "-c"
|
|
- "track_io_timing=on"
|
|
environment:
|
|
POSTGRES_DB: telesrv_main
|
|
POSTGRES_USER: telesrv
|
|
POSTGRES_PASSWORD: ${TELESRV_POSTGRES_PASSWORD:-telesrv}
|
|
TZ: UTC
|
|
ports:
|
|
- "5432:5432"
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
- ./postgres-init:/docker-entrypoint-initdb.d:ro
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U telesrv -d telesrv_main"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 10
|
|
restart: unless-stopped
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: telesrv-redis
|
|
environment:
|
|
REDIS_PASSWORD: ${TELESRV_REDIS_PASSWORD:-}
|
|
command:
|
|
- sh
|
|
- -c
|
|
- exec redis-server --appendonly yes --requirepass "$${REDIS_PASSWORD}"
|
|
ports:
|
|
- "6399:6379" # host port 6379 is often taken by other projects; telesrv exposes 6399 (still 6379 inside the container)
|
|
volumes:
|
|
- redisdata:/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "if [ -n \"$$REDIS_PASSWORD\" ]; then export REDISCLI_AUTH=\"$$REDIS_PASSWORD\"; fi; redis-cli --no-auth-warning ping | grep -qx PONG"]
|
|
interval: 5s
|
|
timeout: 3s
|
|
retries: 10
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
pgdata:
|
|
redisdata:
|