Move Motech to Tomcat root context
This commit is contained in:
parent
5fc43ada06
commit
ae43b232db
@ -249,7 +249,7 @@
|
||||
</div>
|
||||
|
||||
<div class="c" id="motech">
|
||||
<h2><a href="https://motech.{host}/motech/"><img src="img/Motech.png" alt="Motech" title="Motech">Motech</a></h2>
|
||||
<h2><a href="https://motech.{host}/"><img src="img/Motech.png" alt="Motech" title="Motech">Motech</a></h2>
|
||||
<p>Integrace zdravotnických a komunikačních služeb.</p>
|
||||
<ul>
|
||||
<li><strong>Login:</strong> <span class="login"></span></li>
|
||||
|
@ -31,11 +31,11 @@ cp ${SOURCE_DIR}/srv/motech/update-url.sh /srv/motech/update-url.sh
|
||||
service motech start
|
||||
echo `date` '- Waiting for database to be populated. This should take about a minute.'
|
||||
MOTECH_IP=$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' motech)
|
||||
until curl -s "http://${MOTECH_IP}:8080/motech/module/server/startup/" | grep -q adminLogin; do
|
||||
until curl -s "http://${MOTECH_IP}:8080/module/server/startup/" | grep -q adminLogin; do
|
||||
sleep 1
|
||||
done
|
||||
export MOTECH_ADMIN_USER="admin"
|
||||
export MOTECH_ADMIN_EMAIL="admin@example.com"
|
||||
export MOTECH_ADMIN_PWD=$(head -c 12 /dev/urandom | base64)
|
||||
curl -H "Content-Type: application/json" -X POST -d "{\"adminLogin\":\"${MOTECH_ADMIN_USER}\",\"adminEmail\":\"${MOTECH_ADMIN_EMAIL}\",\"adminPassword\":\"${MOTECH_ADMIN_PWD}\",\"adminConfirmPassword\":\"${MOTECH_ADMIN_PWD}\",\"language\":\"cs\",\"providerName\":\"\",\"providerUrl\":\"\",\"schedulerUrl\":\"\"}" http://${MOTECH_IP}:8080/motech/module/server/startup/
|
||||
curl -H "Content-Type: application/json" -X POST -d "{\"adminLogin\":\"${MOTECH_ADMIN_USER}\",\"adminEmail\":\"${MOTECH_ADMIN_EMAIL}\",\"adminPassword\":\"${MOTECH_ADMIN_PWD}\",\"adminConfirmPassword\":\"${MOTECH_ADMIN_PWD}\",\"language\":\"cs\",\"providerName\":\"\",\"providerUrl\":\"\",\"schedulerUrl\":\"\"}" http://${MOTECH_IP}:8080/module/server/startup/
|
||||
spotter-appmgr update-login motech "${MOTECH_ADMIN_USER}" "${MOTECH_ADMIN_PWD}"
|
||||
|
@ -4,12 +4,12 @@ MAINTAINER Disassembler <disassembler@dasm.cz>
|
||||
RUN \
|
||||
# Download Motech
|
||||
wget http://nexus.motechproject.org/service/local/repositories/releases/content/org/motechproject/motech-platform-server/1.0/motech-platform-server-1.0.war -O /tmp/motech.war \
|
||||
&& mkdir /srv/tomcat/webapps/motech \
|
||||
&& unzip /tmp/motech.war -d /srv/tomcat/webapps/motech \
|
||||
&& mkdir /srv/tomcat/webapps/ROOT \
|
||||
&& unzip /tmp/motech.war -d /srv/tomcat/webapps/ROOT \
|
||||
# Update Postgres JDBC driver
|
||||
&& rm -f /srv/tomcat/webapps/motech/WEB-INF/lib/postgresql-9.1-901.jdbc4.jar /srv/tomcat/webapps/motech/WEB-INF/bundles/postgresql-9.1-901.jdbc4.jar \
|
||||
&& wget https://jdbc.postgresql.org/download/postgresql-42.2.2.jar -O /srv/tomcat/webapps/motech/WEB-INF/lib/postgresql-42.2.2.jar \
|
||||
&& cp /srv/tomcat/webapps/motech/WEB-INF/lib/postgresql-42.2.2.jar /srv/tomcat/webapps/motech/WEB-INF/bundles/postgresql-42.2.2.jar \
|
||||
&& rm -f /srv/tomcat/webapps/ROOT/WEB-INF/lib/postgresql-9.1-901.jdbc4.jar /srv/tomcat/webapps/ROOT/WEB-INF/bundles/postgresql-9.1-901.jdbc4.jar \
|
||||
&& wget https://jdbc.postgresql.org/download/postgresql-42.2.2.jar -O /srv/tomcat/webapps/ROOT/WEB-INF/lib/postgresql-42.2.2.jar \
|
||||
&& cp /srv/tomcat/webapps/ROOT/WEB-INF/lib/postgresql-42.2.2.jar /srv/tomcat/webapps/ROOT/WEB-INF/bundles/postgresql-42.2.2.jar \
|
||||
# Create OS user
|
||||
&& addgroup -S -g 8013 motech \
|
||||
&& adduser -S -u 8013 -h /srv/tomcat -s /bin/false -g motech -G motech motech \
|
||||
|
@ -3,4 +3,4 @@
|
||||
HOST="${1}"
|
||||
[ "${2}" != "443" ] && HOST="${1}:${2}"
|
||||
|
||||
sed -i "s|^server\.url.*|server.url=https://${HOST}/motech|" /srv/motech/conf/config/motech-settings.properties
|
||||
sed -i "s|^server\.url.*|server.url=https://${HOST}|" /srv/motech/conf/config/motech-settings.properties
|
||||
|
Loading…
Reference in New Issue
Block a user