Files
mtusi2026lab5/.github/ci/compose.yml
T
ricoromaandClaude Opus 5.5 ff1a83b6ff feat: process attachments asynchronously with RabbitMQ and a worker
Upload answers 202 after staging, a queued job in PostgreSQL and a broker
confirm; a separate worker publishes the original and a thumbnail with
bounded retries. Adds the job and variant tables, the broker service, the
worker S3 user, cleanup and reconcile support for staging and variants,
the failure stand with broker and worker, bench and driver updates.

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

89 lines
3.0 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
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