add rabbitmq entrypoint, fix config permission
This commit is contained in:
parent
5c8d7f02ad
commit
2d105e47a2
14
compose.yml
14
compose.yml
@ -8,7 +8,7 @@ services:
|
||||
configs:
|
||||
- source: entrypoint
|
||||
target: /custom-entrypoint.sh
|
||||
mode: 555
|
||||
mode: 0555
|
||||
entrypoint: /custom-entrypoint.sh
|
||||
environment:
|
||||
DB_HOST: "database"
|
||||
@ -61,7 +61,7 @@ services:
|
||||
configs:
|
||||
- source: pg_backup
|
||||
target: /pg_backup.sh
|
||||
mode: 555
|
||||
mode: 0555
|
||||
healthcheck:
|
||||
test: [ "CMD-SHELL", "pg_isready" ]
|
||||
interval: 10s
|
||||
@ -81,7 +81,7 @@ services:
|
||||
configs:
|
||||
- source: memcached_entrypoint
|
||||
target: /custom-entrypoint.sh
|
||||
mode: 555
|
||||
mode: 0555
|
||||
entrypoint: /custom-entrypoint.sh
|
||||
secrets:
|
||||
- memcached_password
|
||||
@ -95,11 +95,13 @@ services:
|
||||
image: "rabbitmq:4.0.6"
|
||||
environment:
|
||||
RABBITMQ_DEFAULT_USER: "zulip"
|
||||
RABBITMQ_DEFAULT_PASS_FILE: "/run/secrets/rabbitmq_password"
|
||||
configs:
|
||||
- source: rabbitmq_healthcheck
|
||||
target: /healthcheck.sh
|
||||
mode: 555
|
||||
mode: 0555
|
||||
- source: rabbitmq_entrypoint
|
||||
target: /custom-entrypoint.sh
|
||||
mode: 0555
|
||||
secrets:
|
||||
- rabbitmq_password
|
||||
volumes:
|
||||
@ -117,7 +119,7 @@ services:
|
||||
configs:
|
||||
- source: redis_entrypoint
|
||||
target: /custom-entrypoint.sh
|
||||
mode: 555
|
||||
mode: 0555
|
||||
entrypoint: /custom-entrypoint.sh
|
||||
secrets:
|
||||
- redis_password
|
||||
|
17
entryopoint.rabbitmq.sh.tmpl
Normal file
17
entryopoint.rabbitmq.sh.tmpl
Normal file
@ -0,0 +1,17 @@
|
||||
#!/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 "$@"
|
Loading…
x
Reference in New Issue
Block a user