refactor: switch to openresty
This commit is contained in:
parent
8d13f07455
commit
dab5df61a3
@ -11,10 +11,10 @@ ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
ARG TARGETVARIANT
|
||||
|
||||
RUN addgroup -g 101 -S nginx && \
|
||||
adduser -S -D -H -u 101 -h /var/lib/nginx/html -s /sbin/nologin -G nginx -g nginx nginx && \
|
||||
RUN addgroup -g 1001 -S nginx && \
|
||||
adduser -S -D -H -u 1001 -h /var/www -s /sbin/nologin -G nginx -g nginx nginx && \
|
||||
apk --update add --virtual .build-deps curl && \
|
||||
apk --update --no-cache add nginx ca-certificates && \
|
||||
apk --update --no-cache add openresty ca-certificates && \
|
||||
apk --no-cache upgrade libcrypto3 libssl3 && \
|
||||
apk del .build-deps && \
|
||||
rm -rf /var/www && \
|
||||
@ -26,14 +26,14 @@ ADD overlay/ /
|
||||
|
||||
RUN mkdir -p /var/tmp/nginx /var/cache/nginx && \
|
||||
chown -R nginx /var/tmp/nginx /var/cache/nginx && \
|
||||
chown -R nginx:nginx /var/lib/nginx/html && \
|
||||
chown -R nginx:nginx /usr/lib/nginx/nginx/html && \
|
||||
chown -R root:nginx /etc/nginx /etc/nginx/conf.d && \
|
||||
chmod -R 640 /etc/nginx /etc/nginx/conf.d && \
|
||||
chmod 750 /var/lib/nginx/html /var/cache/nginx /etc/nginx /etc/nginx/conf.d
|
||||
chmod 750 /usr/lib/nginx/nginx/html /var/cache/nginx /etc/nginx /etc/nginx/conf.d
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
STOPSIGNAL SIGTERM
|
||||
|
||||
WORKDIR /var/lib/nginx/html
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
WORKDIR /usr/lib/nginx/nginx/html
|
||||
CMD ["nginx", "-e", "stderr", "-g", "daemon off;"]
|
||||
|
@ -3,7 +3,7 @@ server {
|
||||
server_name localhost;
|
||||
|
||||
location / {
|
||||
root /var/lib/nginx/html;
|
||||
root /usr/lib/nginx/nginx/html;
|
||||
index index.html index.htm;
|
||||
}
|
||||
|
||||
@ -11,6 +11,6 @@ server {
|
||||
#
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
root /var/lib/nginx/html;
|
||||
root /usr/lib/nginx/nginx/html;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user