Add Mifos X user + Reorder tomcat installation sequence

This commit is contained in:
Disassembler 2018-01-23 21:01:47 +01:00
parent 50b73c834f
commit aad9076b3f
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499
4 changed files with 11 additions and 6 deletions

View File

@ -23,7 +23,7 @@ rc-update add mifosx boot
service mifosx start
# Update admin account
echo `date` '- Waiting for `mifostenant-default` database to be populated. This should take about a minute.'
echo `date` '- Waiting for database to be populated. This should take about a minute.'
until docker logs mifosx 2>&1 | grep -q 'Migrating schema `mifostenant-default` to version 5000'; do
sleep 1
done

View File

@ -15,10 +15,11 @@ RUN \
wget http://mirror.dkm.cz/apache/tomcat/tomcat-8/v8.0.48/bin/apache-tomcat-8.0.48.tar.gz -O /tmp/apache-tomcat-8.tgz \
&& tar xf /tmp/apache-tomcat-8.tgz -C /srv \
&& mv /srv/apache-tomcat-8.0.48 /srv/tomcat \
&& rm -f /tmp/apache-tomcat-8.tgz \
&& rm -rf /srv/tomcat/webapps/ROOT /srv/tomcat/webapps/docs /srv/tomcat/webapps/examples /srv/tomcat/webapps/host-manager /srv/tomcat/webapps/manager \
# Make catalina.sh available globally
&& ln -s /srv/tomcat/bin/catalina.sh /usr/bin/catalina.sh
&& ln -s /srv/tomcat/bin/catalina.sh /usr/bin/catalina.sh \
# Cleanup
&& rm -rf /srv/tomcat/webapps/ROOT /srv/tomcat/webapps/docs /srv/tomcat/webapps/examples /srv/tomcat/webapps/host-manager /srv/tomcat/webapps/manager \
&& rm -f /tmp/apache-tomcat-8.tgz
RUN \
# Install full-featured wget to work around sourceforge bugs
@ -36,11 +37,15 @@ RUN \
&& sed -i 's/port="8080"/port="8012"/g' /srv/tomcat/conf/server.xml \
&& echo -e '\r\nserver.port=8012' >> /srv/tomcat/webapps/fineract-provider/WEB-INF/classes/application.properties \
&& sed -i 's/requires-channel="https" //g' /srv/tomcat/webapps/fineract-provider/WEB-INF/classes/META-INF/spring/securityContext.xml \
# Create OS user
&& addgroup -S -g 8012 mifosx \
&& adduser -S -u 8012 -h /srv/tomcat -s /bin/false -g mifosx -G mifosx mifosx \
&& chown -R mifosx:mifosx /srv/tomcat/conf /srv/tomcat/logs /srv/tomcat/temp /srv/tomcat/work \
# Cleanup
&& apk del wget \
&& rm -rf /tmp/fineractplatform-17.07.01.RELEASE /tmp/mifosx.zip
EXPOSE 8012
#USER mifosx
USER mifosx
CMD ["catalina.sh", "run"]

View File

@ -35,7 +35,7 @@ RUN \
# Create OS user
&& addgroup -S -g 8013 motech \
&& adduser -S -u 8013 -h /srv/tomcat -s /bin/false -g motech -G motech motech \
&& chown -R motech:motech /srv/tomcat \
&& chown -R motech:motech /srv/tomcat/conf /srv/tomcat/logs /srv/tomcat/temp /srv/tomcat/webapps /srv/tomcat/work \
# Cleanup
&& rm -f /tmp/motech.war

0
motech/etc/init.d/motech Normal file → Executable file
View File