Skip to content

Commit

Permalink
Merge pull request #3018 from nextcloud/enh/noid/adjust-mastercontain…
Browse files Browse the repository at this point in the history
…er-cmd

mastercontainer - run supervisord directly and not as cmd option
  • Loading branch information
szaimen authored Aug 9, 2023
2 parents 4c2acbb + 4b87a5d commit b9099d8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 0 additions & 1 deletion Containers/mastercontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,5 @@ COPY mastercontainer.conf /etc/apache2/sites-available/mastercontainer.conf
USER root

ENTRYPOINT ["/start.sh"]
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]

HEALTHCHECK CMD /healthcheck.sh
9 changes: 8 additions & 1 deletion Containers/mastercontainer/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ if [ "$EUID" != "0" ]; then
exit 1
fi

# Check that the CMD is not overwritten nor set
if [ "$*" != "" ]; then
print_red "Docker run command for AIO is incorrect as a CMD option was given which is not expected."
exit 1
fi

# Check if socket is available and readable
if ! [ -a "/var/run/docker.sock" ]; then
print_red "Docker socket is not available. Cannot continue."
Expand Down Expand Up @@ -310,4 +316,5 @@ caddy fmt --overwrite /Caddyfile
# Fix caddy log
chmod 777 /root

exec "$@"
# Start supervisord
/usr/bin/supervisord -c /supervisord.conf

0 comments on commit b9099d8

Please sign in to comment.