Подключите RabbitMQ и отдельный обработчик заданий

This commit is contained in:
2026-11-18 15:33:33 +03:00
parent 752f29573b
commit 2dc566e6ec
19 changed files with 818 additions and 14 deletions
+9
View File
@@ -37,6 +37,15 @@ if [ "$present" -eq 0 ]; then
printf 'redis://:%s@valkey:6379/0\n' "$kv" > secrets/session_store_url
fi
if [ ! -e secrets/rabbitmq.conf ] && [ ! -e secrets/broker_url ]; then
rabbit_password=$(random)
printf 'default_user = messenger\ndefault_pass = %s\n' "$rabbit_password" > secrets/rabbitmq.conf
printf 'amqp://messenger:%s@broker:5672/\n' "$rabbit_password" > secrets/broker_url
elif [ ! -s secrets/rabbitmq.conf ] || [ ! -s secrets/broker_url ]; then
echo "restore rabbitmq.conf and broker_url together" >&2
exit 1
fi
# Read just the bucket setting, never execute the local .env file as a script.
bucket=${S3_BUCKET:-}
if [ -z "$bucket" ] && [ -f .env ]; then