diff --git a/Dockerfile b/Dockerfile index 6020980..a1410f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,14 +14,14 @@ COPY --from=buildJS /build /build RUN cd /build/public/API && composer install # Prepare Webserver -FROM httpd:alpine +FROM alpine:alpine # |-------------------------------------------------------------------------- # | install dependencies # |-------------------------------------------------------------------------- RUN apk update && \ apk upgrade && \ - apk add php8-apache2 php8-mysqli curl + apk add apache2 php8-apache2 php8-mysqli curl # |-------------------------------------------------------------------------- # | copy website from node build @@ -43,3 +43,9 @@ HEALTHCHECK CMD curl --fail http://localhost || exit 1 # | expose http port # |-------------------------------------------------------------------------- EXPOSE 80 + +# |-------------------------------------------------------------------------- +# | set entrypoint +# |-------------------------------------------------------------------------- +COPY httpd-foreground /usr/local/bin/ +CMD ["httpd-foreground"] \ No newline at end of file diff --git a/httpd-foreground b/httpd-foreground new file mode 100755 index 0000000..e896168 --- /dev/null +++ b/httpd-foreground @@ -0,0 +1,7 @@ +#!/bin/sh +set -e + +# Apache gets grumpy about PID files pre-existing +rm -f /usr/local/apache2/logs/httpd.pid + +exec httpd -DFOREGROUND "$@"