diff --git a/server/Dockerfile b/server/Dockerfile index c938176d..a230ebd0 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -26,5 +26,11 @@ RUN chsh -s /bin/bash www-data ADD init.sh /initnc.sh RUN chmod +x /initnc.sh +ADD run.sh /run.sh +RUN chmod +x /run.sh + +ADD initAndRun.sh /initAndRun.sh +RUN chmod +x /initAndRun.sh + EXPOSE 80 -ENTRYPOINT /initnc.sh +ENTRYPOINT /initAndRun.sh diff --git a/server/init.sh b/server/init.sh index 743fa49e..cdb078b1 100644 --- a/server/init.sh +++ b/server/init.sh @@ -45,11 +45,3 @@ else php occ config:system:set --type string --value '\\OC\\Memcache\\Redis' memcache.distributed " fi - -set -e - -. /etc/apache2/envvars - -tail -f data/nextcloud.log & - -apache2 -DFOREGROUND "$@" diff --git a/server/initAndRun.sh b/server/initAndRun.sh new file mode 100755 index 00000000..b73813d5 --- /dev/null +++ b/server/initAndRun.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash + +/init.sh +/run.sh diff --git a/server/run.sh b/server/run.sh new file mode 100755 index 00000000..a134a20c --- /dev/null +++ b/server/run.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e +cd /var/www/html/ + +. /etc/apache2/envvars + +tail -f data/nextcloud.log & + +apache2 -DFOREGROUND "$@"