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:
|
configs:
|
||||||
- source: entrypoint
|
- source: entrypoint
|
||||||
target: /custom-entrypoint.sh
|
target: /custom-entrypoint.sh
|
||||||
mode: 555
|
mode: 0555
|
||||||
entrypoint: /custom-entrypoint.sh
|
entrypoint: /custom-entrypoint.sh
|
||||||
environment:
|
environment:
|
||||||
DB_HOST: "database"
|
DB_HOST: "database"
|
||||||
@ -61,7 +61,7 @@ services:
|
|||||||
configs:
|
configs:
|
||||||
- source: pg_backup
|
- source: pg_backup
|
||||||
target: /pg_backup.sh
|
target: /pg_backup.sh
|
||||||
mode: 555
|
mode: 0555
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: [ "CMD-SHELL", "pg_isready" ]
|
test: [ "CMD-SHELL", "pg_isready" ]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
@ -81,7 +81,7 @@ services:
|
|||||||
configs:
|
configs:
|
||||||
- source: memcached_entrypoint
|
- source: memcached_entrypoint
|
||||||
target: /custom-entrypoint.sh
|
target: /custom-entrypoint.sh
|
||||||
mode: 555
|
mode: 0555
|
||||||
entrypoint: /custom-entrypoint.sh
|
entrypoint: /custom-entrypoint.sh
|
||||||
secrets:
|
secrets:
|
||||||
- memcached_password
|
- memcached_password
|
||||||
@ -95,11 +95,13 @@ services:
|
|||||||
image: "rabbitmq:4.0.6"
|
image: "rabbitmq:4.0.6"
|
||||||
environment:
|
environment:
|
||||||
RABBITMQ_DEFAULT_USER: "zulip"
|
RABBITMQ_DEFAULT_USER: "zulip"
|
||||||
RABBITMQ_DEFAULT_PASS_FILE: "/run/secrets/rabbitmq_password"
|
|
||||||
configs:
|
configs:
|
||||||
- source: rabbitmq_healthcheck
|
- source: rabbitmq_healthcheck
|
||||||
target: /healthcheck.sh
|
target: /healthcheck.sh
|
||||||
mode: 555
|
mode: 0555
|
||||||
|
- source: rabbitmq_entrypoint
|
||||||
|
target: /custom-entrypoint.sh
|
||||||
|
mode: 0555
|
||||||
secrets:
|
secrets:
|
||||||
- rabbitmq_password
|
- rabbitmq_password
|
||||||
volumes:
|
volumes:
|
||||||
@ -117,7 +119,7 @@ services:
|
|||||||
configs:
|
configs:
|
||||||
- source: redis_entrypoint
|
- source: redis_entrypoint
|
||||||
target: /custom-entrypoint.sh
|
target: /custom-entrypoint.sh
|
||||||
mode: 555
|
mode: 0555
|
||||||
entrypoint: /custom-entrypoint.sh
|
entrypoint: /custom-entrypoint.sh
|
||||||
secrets:
|
secrets:
|
||||||
- redis_password
|
- 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