Spotter-VM/lxc-apps/opendatakit/opendatakit.lxcfile

24 lines
729 B
Plaintext

IMAGE opendatakit_2.0.3-190620
FROM alpine3.9-tomcat8.5_8.5.41-190620
RUN EOF
# Download OpenDataKit
wget https://github.com/opendatakit/aggregate/releases/download/v2.0.3/ODK-Aggregate-v2.0.3.war -O /tmp/odk.war
mkdir /srv/tomcat/webapps/ROOT
unzip /tmp/odk.war -d /srv/tomcat/webapps/ROOT
# Update Postgres JDBC driver
rm /srv/tomcat/webapps/ROOT/WEB-INF/lib/postgresql-42.1.4.jre7.jar
wget https://jdbc.postgresql.org/download/postgresql-42.2.11.jar -O /srv/tomcat/webapps/ROOT/WEB-INF/lib/postgresql-42.2.11.jar
# Change webapps ownership
chown -R tomcat:tomcat /srv/tomcat/webapps
# Cleanup
rm /tmp/odk.war
EOF
USER 8080 8080
WORKDIR /srv/tomcat
CMD /usr/bin/catalina.sh run