Skip to content
This repository has been archived by the owner on Jan 22, 2022. It is now read-only.

Commit

Permalink
Issue 13 permissions node versions (#14)
Browse files Browse the repository at this point in the history
* #13 exclude oracle drivers from scanning, needed to run master without all the supporing oracle jars

* #13 pin node version so we can build

* #13 fix permissions on /srv/home and db lock files
  • Loading branch information
wezell committed Nov 1, 2019
1 parent ef90108 commit 8b48b86
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 5 deletions.
8 changes: 7 additions & 1 deletion images/dotcms/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ARG BUILD_ID
WORKDIR /srv

# Build env dependencies
RUN apk update && apk --no-cache add bash grep openssl git nodejs-current nodejs-current-dev sed
RUN apk update && apk --no-cache add bash grep openssl git nodejs=10.14.2-r0 npm=10.14.2-r0 sed

# dotCMS core distributed under GPLv3 license (https://github.com/dotCMS/core/blob/master/license.txt)
COPY build-src/ /build/
Expand Down Expand Up @@ -63,7 +63,13 @@ RUN wget --quiet https://github.com/jwilder/dockerize/releases/download/$DOCKERI

COPY --from=build-cms /srv/ /srv/
COPY ROOT/ /

RUN find /srv/ -type f -name "*.sh" -exec chmod 551 {} \;
RUN mkdir -p /srv/home

RUN chmod 777 /srv/home
RUN chmod a+wr /srv/templates/dotcms/CONF

RUN mkdir -p /data/shared/assets && mkdir -p /data/local/dotsecure/license
RUN chmod -R 660 /data && find /data/ -type d -exec chmod 770 {} \;

Expand Down
6 changes: 3 additions & 3 deletions images/dotcms/ROOT/srv/50-database-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ case "$PROVIDER_DB_DRIVER" in
esac


touch /srv/DB_CONNECT_TEST
[[ "$PROVIDER_DB_DRIVER" != "H2" ]] && echo "${PROVIDER_DB_DNSNAME}:${PROVIDER_DB_PORT}" >/srv/DB_CONNECT_TEST
chmod 400 /srv/DB_CONNECT_TEST
touch /tmp/DB_CONNECT_TEST
[[ "$PROVIDER_DB_DRIVER" != "H2" ]] && echo "${PROVIDER_DB_DNSNAME}:${PROVIDER_DB_PORT}" >/tmp/DB_CONNECT_TEST


echo "PROVIDER_DB_DRIVER=${PROVIDER_DB_DRIVER}" >>/srv/config/settings.ini
[[ -n "$PROVIDER_DB_URL" ]] && echo "PROVIDER_DB_URL=${PROVIDER_DB_URL}" >>/srv/config/settings.ini
Expand Down
2 changes: 1 addition & 1 deletion images/dotcms/ROOT/srv/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if [[ "${1}" == "dotcms" || -z "${1}" ]]; then

cd /srv/home

DB_CONNECT_TEST="$(cat /srv/DB_CONNECT_TEST | tr -d [:space:])"
DB_CONNECT_TEST="$(cat /tmp/DB_CONNECT_TEST | tr -d [:space:])"
if [[ -n "$DB_CONNECT_TEST" ]]; then
exec -- \
/usr/local/bin/dockerize -wait tcp://${DB_CONNECT_TEST} -timeout 60s \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
<Loader delegate="true"/><!--https://issues.apache.org/bugzilla/show_bug.cgi?id=55943#c13-->
<Resource name="mail/MailSession" auth="Container" type="javax.mail.Session" mail.smtp.host="{{ .Env.CMS_SMTP_HOST }}" />

<!-- http://tomcat.apache.org/tomcat-8.0-doc/config/jar-scanner.html -->
<!-- http://tomcat.apache.org/tomcat-8.0-doc/config/jar-scan-filter.html -->
<JarScanner>
<JarScanFilter
pluggabilitySkip="${tomcat.util.scan.StandardJarScanFilter.jarsToSkip},ojdbc*.jar"
tldSkip="${tomcat.util.scan.StandardJarScanFilter.jarsToSkip},ojdbc*.jar"/>
</JarScanner>

{{ if eq .Env.PROVIDER_DB_DRIVER "H2" }}
<!-- H2 -->
<Resource name="jdbc/dotCMSPool" auth="Container"
Expand Down

0 comments on commit 8b48b86

Please sign in to comment.