# Local / any-host stack: `make up`. Server overrides — infra/deploy/docker-compose.server.yml (#12). services: bot: build: . env_file: .env environment: DATABASE_URL: postgresql+asyncpg://tgit:${POSTGRES_PASSWORD:-tgit}@postgres:5432/tgit GIT_CLONE_DIR: /data/uploads DOCKER_URL: http://docker-proxy:2375 volumes: - uploads:/data depends_on: postgres: condition: service_healthy docker-proxy: condition: service_started restart: unless-stopped mem_limit: 384m # ~190 MB idle; git clone/push and aiogram spikes need headroom labels: tgit.managed: "true" # Shown on the «Статус» card; infra/deploy/remote.sh sets both, a local `make up` leaves them empty tgit.sha: ${TGIT_SHA:-} tgit.deployed_at: ${TGIT_DEPLOYED_AT:-} logging: options: { max-size: "10m", max-file: "3" } postgres: image: postgres:16-alpine environment: POSTGRES_USER: tgit POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-tgit} POSTGRES_DB: tgit volumes: - pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U tgit -d tgit"] interval: 3s timeout: 3s retries: 20 restart: unless-stopped mem_limit: 256m labels: tgit.managed: "true" logging: options: { max-size: "10m", max-file: "3" } # The only holder of the Docker socket: GET on /containers/* and nothing else (ADR-006). The bot never sees the socket. docker-proxy: image: tecnativa/docker-socket-proxy:0.3.0 environment: CONTAINERS: 1 # list, inspect, stats, logs POST: 0 # no create/start/stop/exec — restarts go through tgit-runner (#13) volumes: - /var/run/docker.sock:/var/run/docker.sock:ro restart: unless-stopped mem_limit: 64m labels: tgit.managed: "true" logging: options: { max-size: "10m", max-file: "3" } volumes: pgdata: uploads: