Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
REVERSE PROXY IMAGE
FROM nginx:1.23.1
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y certbot python3-certbot-nginx
COPY ./docker/nginx.conf.template /nginx.conf.template
COPY ./docker/nginx-ssl.conf.template /nginx-ssl.conf.template
COPY ./docker/entrypoint.sh /var/entrypoint.sh
RUN chmod +x /var/entrypoint.sh
Default nginx configuration has only one worker process running. "Auto" is a better setting for scalability.
Commenting out any existing setting, and adding the desired one is more robust against new docker image versions.
RUN sed -i "s/worker_processes/#worker_processes/" /etc/nginx/nginx.conf &&
echo "worker_processes auto;" >> /etc/nginx/nginx.conf &&
echo "worker_rlimit_nofile 16384;" >> /etc/nginx/nginx.conf
Override the default command of the base image:
See: https://github.com/nginxinc/docker-nginx/blob/1.15.7/mainline/stretch/Dockerfile#L99
CMD ["/var/entrypoint