diff --git a/Dockerfile b/Dockerfile index 0d8d1a5..64c8c3b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,6 +26,6 @@ RUN ./hackpad/bin/build.sh ADD start.sh start.sh RUN chmod +x start.sh -EXPOSE 9000 +EXPOSE 5000 CMD '/home/hackpad/start.sh' diff --git a/start.sh b/start.sh index 7d4f7d8..a1467c6 100644 --- a/start.sh +++ b/start.sh @@ -5,11 +5,11 @@ set -e cd "$( dirname "${BASH_SOURCE[0]}" )" ADMIN_EMAILS=${ADMIN_EMAILS:-admin@example.com} -DB_HOST=${DB_HOST:-mysql} +DB_HOST=${DB_HOST:-127.0.0.1} DB_PORT=${DB_PORT:-3306} DB_NAME=${DB_NAME:-hackpad} -DB_USERNAME=${DB_USERNAME:-hackpad} -DB_PASSWORD=${DB_PASSWORD:-password} +DB_USERNAME=${DB_USERNAME:-admin} +DB_PASSWORD=${DB_PASSWORD:-85cd284d} TOP_DOMAINS=${TOP_DOMAINS:-localhost,localbox.info} cp hackpad/etherpad/etc/etherpad.local.properties.tmpl hackpad/etherpad/etc/etherpad.local.properties @@ -22,6 +22,7 @@ sed -i.bak s/__dbc_dbuser__/$DB_USERNAME/g hackpad/etherpad/etc/etherpad.local.p sed -i.bak s/__dbc_dbpass__/$DB_PASSWORD/g hackpad/etherpad/etc/etherpad.local.properties sed -i.bak "s/^\(topdomains = \).*$/\1$TOP_DOMAINS/g" hackpad/etherpad/etc/etherpad.local.properties sed -i.bak "s/^\(devMode = \).*$/\1 true/g" hackpad/etherpad/etc/etherpad.local.properties +sed -i.bak "s/^\(listen = \).*$/\1 5000/g" hackpad/etherpad/etc/etherpad.local.properties sed -i.bak "s/^\(etherpad\.isProduction = \).*$/\1false/g" hackpad/etherpad/etc/etherpad.local.properties sed -i.bak "s/^\(logDir = \).*$/\1.\/data\/logs/g" hackpad/etherpad/etc/etherpad.local.properties echo 'verbose = true' >> hackpad/etherpad/etc/etherpad.local.properties