update fix types etc
This commit is contained in:
parent
2d105e47a2
commit
b72a37a95c
3
abra.sh
3
abra.sh
@ -2,4 +2,5 @@ export ENTRYPOINT_VERSION=v1
|
|||||||
export PG_BACKUP_VERSION=v1
|
export PG_BACKUP_VERSION=v1
|
||||||
export MEM_ENTRYPOINT_VERSION=v1
|
export MEM_ENTRYPOINT_VERSION=v1
|
||||||
export REDIS_ENTRYPOINT_VERSION=v1
|
export REDIS_ENTRYPOINT_VERSION=v1
|
||||||
export RABBIT_HEALTHCHECK_VERSION=v1
|
export RABBIT_HEALTHCHECK_VERSION=v1
|
||||||
|
export RABBIT_ENTRYPOINT_VERSION=v1
|
@ -172,7 +172,11 @@ configs:
|
|||||||
template_driver: golang
|
template_driver: golang
|
||||||
rabbitmq_healthcheck:
|
rabbitmq_healthcheck:
|
||||||
name: ${STACK_NAME}_rabbitmq_healthcheck_${RABBIT_HEALTHCHECK_VERSION}
|
name: ${STACK_NAME}_rabbitmq_healthcheck_${RABBIT_HEALTHCHECK_VERSION}
|
||||||
file: rabbitmq_healthcheck.sh
|
file: rabbitmq_healthcheck.sh.tmpl
|
||||||
|
template_driver: golang
|
||||||
|
rabbitmq_entrypoint:
|
||||||
|
name: ${STACK_NAME}_rabbitmq_entrypoint_${RABBIT_ENTRYPOINT_VERSION}
|
||||||
|
file: entrypoint.rabbitmq.sh.tmpl
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
zulip:
|
zulip:
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ -f /run/secrets/memcached_password ]; then
|
|
||||||
export MEMCACHED_PASSWORD=$(cat /run/secrets/memcached_password)
|
|
||||||
else
|
|
||||||
echo "Membcached password secret not found, skipping."
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# first arg is `-f` or `--some-option`
|
|
||||||
if [ "${1#-}" != "$1" ]; then
|
|
||||||
set -- memcached "$@"
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec "$@"
|
|
@ -1,17 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if [ -f /run/secrets/memcached_password ]; then
|
|
||||||
export MEMCACHED_PASSWORD=$(cat /run/secrets/memcached_password)
|
|
||||||
else
|
|
||||||
echo "Membcached password secret not found, skipping."
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
set -e
|
|
||||||
|
|
||||||
# first arg is `-f` or `--some-option`
|
|
||||||
if [ "${1#-}" != "$1" ]; then
|
|
||||||
set -- memcached "$@"
|
|
||||||
fi
|
|
||||||
|
|
||||||
exec "$@"
|
|
@ -5,7 +5,7 @@ set -e
|
|||||||
if [ -f /run/secrets/memcached_password ]; then
|
if [ -f /run/secrets/memcached_password ]; then
|
||||||
export MEMCACHED_PASSWORD=$(cat /run/secrets/memcached_password)
|
export MEMCACHED_PASSWORD=$(cat /run/secrets/memcached_password)
|
||||||
else
|
else
|
||||||
echo "REDIS secret not found, skipping."
|
echo "memcached_password not found, skipping."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${1#-}" != "$1" ]; then
|
if [ "${1#-}" != "$1" ]; then
|
||||||
|
57
entrypoint.rabbitmq.sh.tmpl
Normal file
57
entrypoint.rabbitmq.sh.tmpl
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if [ -f /run/secrets/rabbitmq_password ]; then
|
||||||
|
export RABBITMQ_DEFAULT_PASS=$(cat /run/secrets/rabbitmq_password)
|
||||||
|
else
|
||||||
|
echo "rabbitmq_password not found, skipping."
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# allow the container to be started with `--user`
|
||||||
|
if [[ "$1" == rabbitmq* ]] && [ "$(id -u)" = '0' ]; then
|
||||||
|
if [ "$1" = 'rabbitmq-server' ]; then
|
||||||
|
find /var/lib/rabbitmq \! -user rabbitmq -exec chown rabbitmq '{}' +
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec gosu rabbitmq "$BASH_SOURCE" "$@"
|
||||||
|
fi
|
||||||
|
|
||||||
|
deprecatedEnvVars=(
|
||||||
|
RABBITMQ_DEFAULT_PASS_FILE
|
||||||
|
RABBITMQ_DEFAULT_USER_FILE
|
||||||
|
RABBITMQ_MANAGEMENT_SSL_CACERTFILE
|
||||||
|
RABBITMQ_MANAGEMENT_SSL_CERTFILE
|
||||||
|
RABBITMQ_MANAGEMENT_SSL_DEPTH
|
||||||
|
RABBITMQ_MANAGEMENT_SSL_FAIL_IF_NO_PEER_CERT
|
||||||
|
RABBITMQ_MANAGEMENT_SSL_KEYFILE
|
||||||
|
RABBITMQ_MANAGEMENT_SSL_VERIFY
|
||||||
|
RABBITMQ_SSL_CACERTFILE
|
||||||
|
RABBITMQ_SSL_CERTFILE
|
||||||
|
RABBITMQ_SSL_DEPTH
|
||||||
|
RABBITMQ_SSL_FAIL_IF_NO_PEER_CERT
|
||||||
|
RABBITMQ_SSL_KEYFILE
|
||||||
|
RABBITMQ_SSL_VERIFY
|
||||||
|
RABBITMQ_VM_MEMORY_HIGH_WATERMARK
|
||||||
|
)
|
||||||
|
hasOldEnv=
|
||||||
|
for old in "${deprecatedEnvVars[@]}"; do
|
||||||
|
if [ -n "${!old:-}" ]; then
|
||||||
|
echo >&2 "error: $old is set but deprecated"
|
||||||
|
hasOldEnv=1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ -n "$hasOldEnv" ]; then
|
||||||
|
echo >&2 'error: deprecated environment variables detected'
|
||||||
|
echo >&2
|
||||||
|
echo >&2 'Please use a configuration file instead; visit https://www.rabbitmq.com/configure.html to learn more'
|
||||||
|
echo >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if long and short hostnames are not the same, use long hostnames
|
||||||
|
if [ -z "${RABBITMQ_USE_LONGNAME:-}" ] && [ "$(hostname)" != "$(hostname -s)" ]; then
|
||||||
|
: "${RABBITMQ_USE_LONGNAME:=true}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec "$@"
|
@ -3,7 +3,7 @@
|
|||||||
if [ -f /run/secrets/redis_password ]; then
|
if [ -f /run/secrets/redis_password ]; then
|
||||||
export REDIS_PASSWORD=$(cat /run/secrets/redis_password)
|
export REDIS_PASSWORD=$(cat /run/secrets/redis_password)
|
||||||
else
|
else
|
||||||
echo "REDIS secret not found, skipping."
|
echo "redis_password not found, skipping."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,37 +3,37 @@
|
|||||||
if [ -f /run/secrets/db_password ]; then
|
if [ -f /run/secrets/db_password ]; then
|
||||||
export SECRETS_postgres_password=$(cat /run/secrets/db_password)
|
export SECRETS_postgres_password=$(cat /run/secrets/db_password)
|
||||||
else
|
else
|
||||||
echo "Postgres password secret not found, skipping."
|
echo "db_password not found, skipping."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f /run/secrets/memcached_password ]; then
|
if [ -f /run/secrets/memcached_password ]; then
|
||||||
export SECRETS_memcached_password=$(cat /run/secrets/memcached_password)
|
export SECRETS_memcached_password=$(cat /run/secrets/memcached_password)
|
||||||
else
|
else
|
||||||
echo "Membcached password secret not found, skipping."
|
echo "memcached_password not found, skipping."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f /run/secrets/redis_password ]; then
|
if [ -f /run/secrets/redis_password ]; then
|
||||||
export SECRETS_redis_password=$(cat /run/secrets/redis_password)
|
export SECRETS_redis_password=$(cat /run/secrets/redis_password)
|
||||||
else
|
else
|
||||||
echo "DB password secret not found, skipping."
|
echo "redis_password not found, skipping."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f /run/secrets/rabbitmq_password ]; then
|
if [ -f /run/secrets/rabbitmq_password ]; then
|
||||||
export SECRETS_rabbitmq_password=$(cat /run/secrets/rabbitmq_password)
|
export SECRETS_rabbitmq_password=$(cat /run/secrets/rabbitmq_password)
|
||||||
else
|
else
|
||||||
echo "DB password secret not found, skipping."
|
echo "rabbitmq_password not found, skipping."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f /run/secrets/smtp_password ]; then
|
if [ -f /run/secrets/smtp_password ]; then
|
||||||
export SECRETS_email_password=$(cat /run/secrets/smtp_password)
|
export SECRETS_email_password=$(cat /run/secrets/smtp_password)
|
||||||
else
|
else
|
||||||
echo "DB password secret not found, skipping."
|
echo "smtp_password not found, skipping."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -f /run/secrets/zulip_secret ]; then
|
if [ -f /run/secrets/zulip_secret ]; then
|
||||||
export SECRETS_secret_key=$(cat /run/secrets/zulip_secret)
|
export SECRETS_secret_key=$(cat /run/secrets/zulip_secret)
|
||||||
else
|
else
|
||||||
echo "Zulip secret not found, skipping."
|
echo "zulip_secret not found, skipping."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user