-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add http3 support to nginx image, enable it for static files
- Loading branch information
Showing
11 changed files
with
45 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,25 @@ | ||
FROM alpine:edge | ||
FROM macbre/nginx-http3 | ||
|
||
LABEL org.opencontainers.image.authors="Dmitry Verkhoturov <[email protected]>" \ | ||
org.opencontainers.image.description="nginx with brotli installed and running as non-root user, with reload for cert renewal once in six hours" \ | ||
org.opencontainers.image.documentation="https://github.com/paskal/bitrix.infra" \ | ||
org.opencontainers.image.source="https://github.com/paskal/bitrix.infra.git" \ | ||
org.opencontainers.image.title="nginx" | ||
|
||
USER root | ||
|
||
# for shadow package | ||
RUN echo http://dl-2.alpinelinux.org/alpine/edge/community/ >> /etc/apk/repositories | ||
|
||
# shadow for usermod | ||
RUN apk add --no-cache nginx-mod-http-brotli shadow | ||
RUN apk add --no-cache shadow | ||
|
||
RUN usermod -u 1000 nginx | ||
RUN groupmod -g 1000 nginx | ||
|
||
# prepare to switching to non-root - update file permissions of directory containing | ||
# nginx.lock and nginx.pid file | ||
RUN chown -R --verbose nginx:nginx /var/run/nginx/ /var/cache/nginx/ | ||
|
||
# run nginx with configuration reload once in every 6 hours | ||
CMD /bin/sh -c 'while :; do /bin/sleep 6h & wait ${!}; /usr/sbin/nginx -s reload; done & /usr/sbin/nginx -g "daemon off;"' |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
server { | ||
listen 443 http2 ssl; | ||
listen 443 ssl; | ||
listen 443 quic; | ||
|
||
server_name dev-test.favor-group.ru; | ||
|
||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
server { | ||
listen 443 http2 ssl; | ||
listen 443 ssl; | ||
listen 443 quic; | ||
|
||
server_name dev.favor-group.ru; | ||
|
||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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