Files
mtusi2026lab5/.github/ci/compose.yml
T
ricoromaandClaude Opus 5.5 e2a6427c24 feat: add job outbox, relay, leases and image variants to the pipeline
Move publishing out of the upload path: a relay process publishes queued
jobs with confirms. Add lease and attempt fencing, backoff with jitter, a
per-job render process with CPU and memory limits, crop and optimized
variants, the failed registry with audited replay, and staging cleanup.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 15:36:15 +03:00

94 lines
3.1 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Стенд в CI: docker-compose.yml + этот файл (COMPOSE_FILE job
# application, .github/workflows/application.yml). Раннер Gitea
# (act_runner) запускает job в контейнере рядом со стендом, на том же
# Docker. Файлы рабочего каталога есть только в контейнере job, а bind
# mount ищет их на хосте раннера; порты на 127.0.0.1 хоста из job не
# видны и на общем хосте заняли бы чужие. Поэтому отличия от рабочего
# стенда только такие:
# - конфиги — configs из переменных окружения (их выставляет
# .github/ci/stand-env.sh): compose копирует содержимое в контейнер при
# создании, пути на хосте не нужно;
# - портов на хосте нет: job подключается к сети стенда и ходит на
# haproxy по имени;
# - образ API — с тегом прогона: тег mtusi-messenger:lab5 на общем хосте
# раннера может собрать и чужой job.
# Остальное — сервисы, лимиты, volumes, секреты по сервисам — как в
# рабочем стенде. Нужен Compose ≥ 2.24 (!reset).
services:
postgres:
ports: !reset []
valkey:
ports: !reset []
volumes: !reset []
configs:
- source: valkey_conf
target: /usr/local/etc/valkey/valkey.conf
s3:
ports: !reset []
s3-bootstrap:
volumes: !reset []
configs:
- source: s3_bootstrap
target: /opt/s3/bootstrap.sh
rabbitmq:
ports: !reset []
# !override: bind mount конфига заменяют configs, volume данных остаётся
volumes: !override
- rabbitmq_data:/var/lib/rabbitmq
configs:
- source: rabbitmq_conf
target: /etc/rabbitmq/conf.d/90-messenger.conf
migrate:
image: &ci-image mtusi-messenger:${CI_IMAGE_TAG:?CI_IMAGE_TAG is not set}
volumes: !reset []
configs: &config-toml
- source: config_toml
target: /app/config.toml
api:
image: *ci-image
volumes: !reset []
configs: *config-toml
cleaner:
image: *ci-image
volumes: !reset []
configs: *config-toml
relay:
image: *ci-image
volumes: !reset []
configs: *config-toml
worker:
image: *ci-image
volumes: !reset []
configs: *config-toml
haproxy:
ports: !reset []
volumes: !reset []
configs:
- source: haproxy_cfg
target: /usr/local/etc/haproxy/haproxy.cfg
# файлы по умолчанию 0444 и root: непривилегированные пользователи
# контейнеров читают, но не меняют — как read_only у bind mount
configs:
config_toml:
environment: CI_CONFIG_TOML
valkey_conf:
environment: CI_VALKEY_CONF
s3_bootstrap:
environment: CI_S3_BOOTSTRAP
rabbitmq_conf:
environment: CI_RABBITMQ_CONF
haproxy_cfg:
environment: CI_HAPROXY_CFG