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>
This commit is contained in:
@@ -35,6 +35,15 @@ services:
|
||||
- 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 []
|
||||
@@ -52,6 +61,11 @@ services:
|
||||
volumes: !reset []
|
||||
configs: *config-toml
|
||||
|
||||
worker:
|
||||
image: *ci-image
|
||||
volumes: !reset []
|
||||
configs: *config-toml
|
||||
|
||||
haproxy:
|
||||
ports: !reset []
|
||||
volumes: !reset []
|
||||
@@ -68,5 +82,7 @@ configs:
|
||||
environment: CI_VALKEY_CONF
|
||||
s3_bootstrap:
|
||||
environment: CI_S3_BOOTSTRAP
|
||||
rabbitmq_conf:
|
||||
environment: CI_RABBITMQ_CONF
|
||||
haproxy_cfg:
|
||||
environment: CI_HAPROXY_CFG
|
||||
|
||||
@@ -10,7 +10,8 @@ CI_CONFIG_TOML="$(cat config.toml)$nl"
|
||||
CI_VALKEY_CONF="$(cat infra/valkey/valkey.conf)$nl"
|
||||
CI_S3_BOOTSTRAP="$(cat infra/s3/bootstrap.sh)$nl"
|
||||
CI_HAPROXY_CFG="$(cat infra/haproxy/haproxy.cfg)$nl"
|
||||
export CI_CONFIG_TOML CI_VALKEY_CONF CI_S3_BOOTSTRAP CI_HAPROXY_CFG
|
||||
CI_RABBITMQ_CONF="$(cat infra/rabbitmq/rabbitmq.conf)$nl"
|
||||
export CI_CONFIG_TOML CI_VALKEY_CONF CI_S3_BOOTSTRAP CI_HAPROXY_CFG CI_RABBITMQ_CONF
|
||||
|
||||
# готовность стенда через LB: /health/ready отвечает 200 от API_REPLICAS
|
||||
# (из .env, по умолчанию 2) разных реплик — X-Instance-Id. Срок 60 с:
|
||||
|
||||
Reference in New Issue
Block a user