Fix startup of nginx after base image changes

This commit fixes an issue where the nginx container does not start
as a result of the nginx packaged with raspbian daemonizing by default,
as well as including a conflicting virtualhost configs from under /etc/nginx/sites-enabled.

Therefore, this change disables nginx daemonizing
in identical manner to the nginx upstream docker containers
(https://github.com/nginxinc/docker-nginx/blob/master/Dockerfile-debian.template#L106)
as well as removed the package default nginx virtualhost configuration.
This commit is contained in:
Nash Kaminski
2021-03-09 23:01:14 -06:00
parent a67b73ca50
commit 8074837aba

View File

@@ -12,6 +12,7 @@ ENV GIT_SHORT_HASH=$GIT_SHORT_HASH
ARG GIT_BRANCH
ENV GIT_BRANCH=$GIT_BRANCH
COPY docker/nginx/nginx.conf /etc/nginx/conf.d/srly-ose.conf
COPY docker/nginx/nginx.conf /etc/nginx/sites-enabled/srly-ose.conf
RUN rm -f /etc/nginx/sites-enabled/default
CMD nginx
CMD ["nginx", "-g", "daemon off;"]