Page MenuHomeGRNET

No OneTemporary

File Metadata

Created
Fri, Aug 29, 3:08 PM
diff --git a/webdns/entrypoint.sh b/webdns/entrypoint.sh
index fec68fd..34c4ba6 100644
--- a/webdns/entrypoint.sh
+++ b/webdns/entrypoint.sh
@@ -1,29 +1,40 @@
#!/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}_test"
+
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}
+ 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

Event Timeline