Add Mifos X user + Reorder tomcat installation sequence
This commit is contained in:
parent
50b73c834f
commit
aad9076b3f
@ -23,7 +23,7 @@ rc-update add mifosx boot
|
|||||||
service mifosx start
|
service mifosx start
|
||||||
|
|
||||||
# Update admin account
|
# 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
|
until docker logs mifosx 2>&1 | grep -q 'Migrating schema `mifostenant-default` to version 5000'; do
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
@ -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 \
|
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 \
|
&& tar xf /tmp/apache-tomcat-8.tgz -C /srv \
|
||||||
&& mv /srv/apache-tomcat-8.0.48 /srv/tomcat \
|
&& 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
|
# 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 \
|
RUN \
|
||||||
# Install full-featured wget to work around sourceforge bugs
|
# 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 \
|
&& 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 \
|
&& 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 \
|
&& 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
|
# Cleanup
|
||||||
&& apk del wget \
|
&& apk del wget \
|
||||||
&& rm -rf /tmp/fineractplatform-17.07.01.RELEASE /tmp/mifosx.zip
|
&& rm -rf /tmp/fineractplatform-17.07.01.RELEASE /tmp/mifosx.zip
|
||||||
|
|
||||||
EXPOSE 8012
|
EXPOSE 8012
|
||||||
|
|
||||||
#USER mifosx
|
USER mifosx
|
||||||
CMD ["catalina.sh", "run"]
|
CMD ["catalina.sh", "run"]
|
||||||
|
@ -35,7 +35,7 @@ RUN \
|
|||||||
# Create OS user
|
# Create OS user
|
||||||
&& addgroup -S -g 8013 motech \
|
&& addgroup -S -g 8013 motech \
|
||||||
&& adduser -S -u 8013 -h /srv/tomcat -s /bin/false -g motech -G motech 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
|
# Cleanup
|
||||||
&& rm -f /tmp/motech.war
|
&& rm -f /tmp/motech.war
|
||||||
|
|
||||||
|
0
motech/etc/init.d/motech
Normal file → Executable file
0
motech/etc/init.d/motech
Normal file → Executable file
Loading…
Reference in New Issue
Block a user