-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from EyeSeeTea/development
Development
- Loading branch information
Showing
18 changed files
with
96 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,31 @@ | ||
FROM tomcat:9.0.20-jre8-alpine | ||
FROM tomcat:9.0.64-jre11-openjdk-slim-bullseye | ||
|
||
ENV DHIS2_HOME=/DHIS2_home | ||
ENV DHIS2_CERT=/DHIS2_home/who_pub_cert.cert | ||
ENV DATA_DIR=/data | ||
|
||
COPY docker-entrypoint.sh /usr/local/bin/ | ||
|
||
RUN rm -rf /usr/local/tomcat/webapps/* && \ | ||
mkdir /usr/local/tomcat/webapps/ROOT && \ | ||
mkdir -p /usr/local/tomcat/webapps/ROOT && \ | ||
chmod +rx /usr/local/bin/docker-entrypoint.sh && \ | ||
mkdir $DHIS2_HOME && \ | ||
addgroup -S tomcat && \ | ||
mkdir $DATA_DIR && \ | ||
addgroup --system tomcat && \ | ||
addgroup root tomcat && \ | ||
adduser -S -D -G tomcat tomcat | ||
useradd --shell /bin/bash --uid 101 --gid tomcat tomcat | ||
|
||
COPY who_pub_cert.cert $DHIS2_CERT | ||
RUN chmod +rx $DHIS2_CERT | ||
RUN keytool -importcert -alias who_mail_ichigoout -file $DHIS2_CERT -keystore /usr/local/openjdk-11/lib/security/cacerts -storepass changeit -noprompt | ||
|
||
RUN apk add --update --no-cache bash su-exec curl postgresql-client fontconfig ttf-dejavu | ||
|
||
RUN apt-get update | ||
RUN echo 'You can disregard the warning in noninteractive installations:' \ | ||
'"debconf: delaying package configuration, since apt-utils is not installed"' | ||
RUN apt-get install --no-install-recommends -y \ | ||
unzip curl postgresql-client fonts-dejavu fontconfig util-linux | ||
|
||
COPY dhis.war /usr/local/tomcat/webapps/ROOT.war | ||
COPY dhis2-home-files /dhis2-home-files | ||
|
||
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] | ||
|
||
CMD ["catalina.sh", "run"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,31 @@ | ||
#!/bin/bash | ||
set -e | ||
# | ||
# This file should be basically the same as config/dhis2-core-entrypoint.sh | ||
# | ||
set -e # exit on errors | ||
|
||
WARFILE=/usr/local/tomcat/webapps/ROOT.war | ||
TOMCATDIR=/usr/local/tomcat | ||
DHIS2HOME=/DHIS2_home | ||
DATA_DIR="/data/" | ||
DATA_DIR=/data | ||
|
||
if [ "$(id -u)" = "0" ]; then | ||
if [ -f $WARFILE ]; then | ||
unzip $WARFILE -d $TOMCATDIR/webapps/ROOT | ||
rm $WARFILE | ||
unzip -q $WARFILE -d $TOMCATDIR/webapps/ROOT | ||
rm -v $WARFILE # just to save space | ||
fi | ||
|
||
chown -R tomcat:tomcat $TOMCATDIR $DATA_DIR $DHIS2HOME | ||
chmod -R u=rwX,g=rX,o-rwx $TOMCATDIR $DATA_DIR $DHIS2HOME | ||
|
||
# Launch the given command as tomcat, in two ways for backwards compatibility: | ||
if [ "$(grep '^ID=' /etc/os-release)" = "ID=alpine" ]; then | ||
# The alpine linux way (for old images). | ||
exec su-exec tomcat "$0" "$@" | ||
else | ||
# The ubuntu way (for new images). | ||
exec setpriv --reuid=tomcat --regid=tomcat --init-groups "$0" "$@" | ||
fi | ||
|
||
chown -R tomcat:tomcat $DATA_DIR $TOMCATDIR | ||
chmod -R u+rwX,g+rX,o-rwx $DATA_DIR $TOMCATDIR | ||
chown -R tomcat:tomcat \ | ||
$DATA_DIR \ | ||
$TOMCATDIR/temp \ | ||
$TOMCATDIR/work \ | ||
$TOMCATDIR/logs | ||
|
||
chown -R tomcat:tomcat $DHIS2HOME | ||
exec su-exec tomcat "$0" "$@" | ||
fi | ||
|
||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIGJDCCBQygAwIBAgIQJUJnlAcKVsfQ9MMGpFjCBTANBgkqhkiG9w0BAQsFADCB | ||
jzELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G | ||
A1UEBxMHU2FsZm9yZDEYMBYGA1UEChMPU2VjdGlnbyBMaW1pdGVkMTcwNQYDVQQD | ||
Ey5TZWN0aWdvIFJTQSBEb21haW4gVmFsaWRhdGlvbiBTZWN1cmUgU2VydmVyIENB | ||
MB4XDTIyMDMxNjAwMDAwMFoXDTIzMDQxNjIzNTk1OVowFDESMBAGA1UEAwwJKi53 | ||
aG8uaW50MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAxSHGIzs9hI1G | ||
hoQpRqA6AJJHtV5UNU7HYGqewe/g/hO78YKa3GkCr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2LcttiDqOOBSHumEFnAyE4VNO9IrwTpXo1LrUgAAAX+THioV | ||
AAAEAwBHMEUCIQC5LVSJjK/+axH2ygQBQvZBteFsrpfrjTwlxRUZIOVOegIgfe+9 | ||
UxpopGPMoxAinRvmhV80DC2SjyB5tJ5gxdEwjy0AdQDoPtDaPvUGNTLnVyi8iWvJ | ||
A9PL0RFr7Otp4Xd9bQa9bgAAAX+THiniAAAEAwBGMEQCIGzDAwbnDDooUiBzsIgx | ||
qQTH9LWRw/sUP6oPqC/TCy5IAiBv5zoBNQRFF5xL747h+fonfzO29cOTOxII7OOE | ||
tB5PtDANBgkqhkiG9w0BAQsFAAOCAQEAZoC2S+nrxP2loGfjDvbjo0N9cc7KhCJv | ||
XPAG3qvc1T4RI4ZCfTKY5vpFYqu6E/TMdGlDTXD3NxheJyScm51x5tXGfvIsnKDc | ||
//zWyUXvZPnJWLEjP4JKsRb/Gi8hIPfLP0PST1xjk+JlxE+vfbHfH5BUegfpfBgv | ||
Fu+HiJEFS3ZDE6Im61Hq5BdMdLF84u5khs0smbWOyP4tP9fqD6gnq0RV+gcI2JzU | ||
LLc0mPIpLqQ87zvj/Re0rMGS/JhXp4cAyvIuwi1AuechGjQR1zeBNgVIkxd+ccnc | ||
OaI6t3HH7OQ2K8pCNLa4PyoAJL/XnIwq0FwvqSVKW8h3vTdZ4Z0+Jg== | ||
-----END CERTIFICATE----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/sh | ||
#!/bin/bash | ||
set -e -u | ||
|
||
# Global: VOLUME="/path/to/destination" | ||
|