mirror of
https://github.com/nginx-proxy/nginx-proxy
synced 2024-05-08 00:26:08 +02:00
feat: use nginx image builtin entrypoint
This commit is contained in:
parent
4a8aa5db67
commit
952087befc
|
@ -21,7 +21,7 @@ RUN apk add --no-cache --virtual .run-deps \
|
|||
&& update-ca-certificates
|
||||
|
||||
# Configure Nginx
|
||||
RUN echo "daemon off;" >> /etc/nginx/nginx.conf \
|
||||
RUN sed -i 's/\[ "\$1" = "nginx" \]/\[ "\$1" = "forego" \] || \[ "\$1" = "nginx" \]/' /docker-entrypoint.sh \
|
||||
&& sed -i 's/worker_processes 1/worker_processes auto/' /etc/nginx/nginx.conf \
|
||||
&& sed -i 's/worker_connections 1024/worker_connections 10240/' /etc/nginx/nginx.conf \
|
||||
&& mkdir -p '/etc/nginx/dhparam'
|
||||
|
@ -31,9 +31,9 @@ COPY --from=forego /usr/local/bin/forego /usr/local/bin/forego
|
|||
COPY --from=docker-gen /usr/local/bin/docker-gen /usr/local/bin/docker-gen
|
||||
|
||||
COPY network_internal.conf /etc/nginx/
|
||||
COPY app/40-nginx-proxy.sh /docker-entrypoint.d/
|
||||
|
||||
COPY app nginx.tmpl LICENSE /app/
|
||||
WORKDIR /app/
|
||||
|
||||
ENTRYPOINT ["/app/docker-entrypoint.sh"]
|
||||
CMD ["forego", "start", "-r"]
|
||||
|
|
|
@ -20,7 +20,7 @@ RUN apt-get update \
|
|||
&& rm -r /var/lib/apt/lists/*
|
||||
|
||||
# Configure Nginx
|
||||
RUN echo "daemon off;" >> /etc/nginx/nginx.conf \
|
||||
RUN sed -i 's/\[ "\$1" = "nginx" \]/\[ "\$1" = "forego" \] || \[ "\$1" = "nginx" \]/' /docker-entrypoint.sh \
|
||||
&& sed -i 's/worker_processes 1/worker_processes auto/' /etc/nginx/nginx.conf \
|
||||
&& sed -i 's/worker_connections 1024/worker_connections 10240/' /etc/nginx/nginx.conf \
|
||||
&& mkdir -p '/etc/nginx/dhparam'
|
||||
|
@ -30,9 +30,9 @@ COPY --from=forego /usr/local/bin/forego /usr/local/bin/forego
|
|||
COPY --from=docker-gen /usr/local/bin/docker-gen /usr/local/bin/docker-gen
|
||||
|
||||
COPY network_internal.conf /etc/nginx/
|
||||
COPY app/40-nginx-proxy.sh /docker-entrypoint.d/
|
||||
|
||||
COPY app nginx.tmpl LICENSE /app/
|
||||
WORKDIR /app/
|
||||
|
||||
ENTRYPOINT ["/app/docker-entrypoint.sh"]
|
||||
CMD ["forego", "start", "-r"]
|
||||
|
|
|
@ -117,5 +117,3 @@ if [[ $* == 'forego start -r' ]]; then
|
|||
EOT
|
||||
fi
|
||||
fi
|
||||
|
||||
exec "$@"
|
|
@ -1,2 +1,2 @@
|
|||
dockergen: docker-gen -watch -notify "nginx -s reload" /app/nginx.tmpl /etc/nginx/conf.d/default.conf
|
||||
nginx: nginx
|
||||
nginx: nginx -g "daemon off;"
|
Loading…
Reference in New Issue