File tree Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 27
27
name : Build and push
28
28
uses : docker/build-push-action@v4
29
29
with :
30
- platforms : linux/amd64,linux/arm64
30
+ platforms : linux/amd64
31
31
push : true
32
32
tags : ghcr.io/deltablot/custom-http-nginx:latest
Original file line number Diff line number Diff line change @@ -98,14 +98,15 @@ FROM alpine:3.20
98
98
COPY --from=nginx-builder /usr/sbin/nginx /usr/sbin/nginx
99
99
COPY --from=nginx-builder /etc/nginx/mime.types /etc/nginx/mime.types
100
100
COPY --from=nginx-builder /etc/nginx/fastcgi.conf /etc/nginx/fastcgi.conf
101
- COPY --from=nginx-builder /var/lib/nginx /var/lib/nginx
102
101
# create the log folder and make the logfiles links to stdout/stderr so docker logs will catch it
103
102
RUN mkdir -p /var/log/nginx \
104
103
&& ln -sf /dev/stdout /var/log/nginx/access.log \
105
104
&& ln -sf /dev/stderr /var/log/nginx/error.log
106
- ADD nginx.conf /etc/nginx/nginx.conf
107
- ADD common.conf /etc/nginx/common.conf
105
+ COPY nginx.conf /etc/nginx/nginx.conf
106
+ COPY common.conf /etc/nginx/common.conf
108
107
RUN mkdir /etc/nginx/conf.d
108
+ COPY brotli.conf /etc/nginx/conf.d
109
109
RUN mkdir /nginx && chown nobody:nobody /nginx
110
+ RUN apk add --no-cache brotli
110
111
USER nobody
111
112
ENTRYPOINT ["nginx" ]
Original file line number Diff line number Diff line change
1
+ # Enable Brotli
2
+ brotli on;
3
+ brotli_static on;
4
+ brotli_comp_level 6;
5
+
6
+ # File types to compress
7
+ brotli_types application/atom+xml application/javascript application/json application/rss+xml
8
+ application/vnd.ms-fontobject application/x-font-opentype application/x-font-truetype
9
+ application/x-font-ttf application/x-javascript application/xhtml+xml application/xml
10
+ font/eot font/opentype font/otf font/truetype image/svg+xml image/vnd.microsoft.icon
11
+ image/x-icon image/x-win-bitmap text/css text/javascript text/plain text/xml;
You can’t perform that action at this time.
0 commit comments