Files
invoiceninja-docker/app-entrypoint.sh
2015-11-14 23:06:59 +01:00

18 lines
395 B
Bash

#!/bin/bash
set -e
# if we're linked to MySQL, and we're using the root user, and our linked
# container has a default "root" password set up and passed through... :)
: ${DB_USERNAME:=root}
if [ "$DB_USERNAME" = 'root' ]; then
: ${DB_PASSWORD:=$MYSQL_ENV_MYSQL_ROOT_PASSWORD}
fi
echo "DB_USERNAME=$DB_USERNAME" >> .env
echo "DB_PASSWORD=$DB_PASSWORD" >> .env
chown www-data .env
exec "$@"