diff --git a/webdns/entrypoint.sh b/webdns/entrypoint.sh index e6a6043..532a453 100644 --- a/webdns/entrypoint.sh +++ b/webdns/entrypoint.sh @@ -1,40 +1,39 @@ #!/bin/bash if [ -z "${MYSQL_HOST}" ]; then echo "You need to specify a mysql host." exit fi MYSQL_DATABASE=${MYSQL_DATABASE-dns} MYSQL_USER=${MYSQL_USER-dns} MYSQL_PORT=${MYSQL_PORT-3306} MYSQL_PASSWORD=${MYSQL_PASSWORD-12345} MYSQL_TEST_DATABASE="${MYSQL_DATABASE}_test" -MYSQL_TEST_USER="${MYSQL_USER}" sleep 20 cat << EOF > /srv/webdns/config/database.yml development: database: ${MYSQL_DATABASE} adapter: mysql2 encoding: utf8 username: ${MYSQL_USER} password: ${MYSQL_PASSWORD} host: ${MYSQL_HOST} test: database: ${MYSQL_TEST_DATABASE} adapter: mysql2 encoding: utf8 - username: ${MYSQL_TEST_USER} + username: ${MYSQL_USER} password: ${MYSQL_PASSWORD} host: ${MYSQL_HOST} EOF /usr/bin/rake db:migrate /usr/bin/rails runner /seeds_users.rb #/usr/bin/rails runner seeds_policies.rb cd /srv/webdns rails server