Add method of mixing in secrets to docker-compose.yml
This commit is contained in:
21
bin/mixin-secrets
Executable file
21
bin/mixin-secrets
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Generates a fancy docker-compose.yml based on the template by
|
||||
# mixing in production secrets.
|
||||
#
|
||||
# Olivia Mackintosh <livvy@base.nu>
|
||||
|
||||
THISDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
TEMPLATE=${THISDIR}/../docker-compose.yml.template
|
||||
|
||||
if [ -z "$DATABASE_PASSWORD" ]; then
|
||||
echo "Error: Please set \$DATABASE_PASSWORD"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "$SMTP_PASSWORD" ]; then
|
||||
echo "Error: Please set \$SMTP_PASSWORD"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
envsubst < $TEMPLATE | cat -
|
Reference in New Issue
Block a user