feat: switch to alpine base+edit nginx.conf w/sed
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
* use epoll * etag off * server_tokens off * tcp_{nopush,nodelay} on * s/spaces/tabs/
This commit is contained in:
parent
f7f260687a
commit
eab16418c8
12
Dockerfile
12
Dockerfile
@ -11,5 +11,15 @@ RUN hugo --minify --gc=true
|
|||||||
|
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
|
|
||||||
FROM nginx
|
FROM nginx:mainline-alpine
|
||||||
COPY --from=0 /homepage/public/ /usr/share/nginx/html
|
COPY --from=0 /homepage/public/ /usr/share/nginx/html
|
||||||
|
|
||||||
|
# tripple slash reference
|
||||||
|
# https://stackoverflow.com/questions/5190966/using-sed-to-insert-tabs/5191165#5191165
|
||||||
|
RUN sed -i -e 's/^worker_processes auto;/worker_processes auto;/'\
|
||||||
|
-e "/^events {$/ a \\\tmulti_accept on;\n\tuse epoll;"\
|
||||||
|
-e "/^http {$/ a \\\tserver_tokens off;\n\tetag off;\n"\
|
||||||
|
-e 's/#tcp_nopush/tcp_nopush/'\
|
||||||
|
-e "/tcp_nopush/ a \\\ttcp_nodelay on;"\
|
||||||
|
-e "s/^ */$(printf '\t')/"\
|
||||||
|
/etc/nginx/nginx.conf
|
||||||
|
Loading…
Reference in New Issue
Block a user