Skip to content

Commit

Permalink
server: split up init and run, so that inbetween new user can be… (#162)
Browse files Browse the repository at this point in the history
server: split up init and run, so that inbetween new user can be added
  • Loading branch information
juliushaertl committed Aug 20, 2019
2 parents 05bbab8 + 0deb16e commit 71d93b6
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 9 deletions.
8 changes: 7 additions & 1 deletion server/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 0 additions & 8 deletions server/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@"
4 changes: 4 additions & 0 deletions server/initAndRun.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash

/init.sh
/run.sh
10 changes: 10 additions & 0 deletions server/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh

set -e
cd /var/www/html/

. /etc/apache2/envvars

tail -f data/nextcloud.log &

apache2 -DFOREGROUND "$@"

0 comments on commit 71d93b6

Please sign in to comment.