Dockerfile, -nginx.conf: regenerate nginx mime types using Debian media-types package
This commit is contained in:
parent
46e1b3e57d
commit
70ca5462ee
|
@ -10,6 +10,13 @@ RUN bundle install
|
||||||
COPY . /home
|
COPY . /home
|
||||||
RUN jekyll build
|
RUN jekyll build
|
||||||
|
|
||||||
|
FROM debian:bookworm AS mime-types
|
||||||
|
RUN apt-get update && apt-get install -y media-types
|
||||||
|
|
||||||
|
RUN echo 'types {' > /tmp/mime.types
|
||||||
|
RUN sed -e '/^$/d' -e 's/$/;/' /etc/mime.types >> /tmp/mime.types
|
||||||
|
RUN echo '}' >> /tmp/mime.types
|
||||||
|
|
||||||
FROM nginx
|
FROM nginx
|
||||||
COPY --from=builder /home/_site /usr/share/nginx/html
|
COPY --from=builder /home/_site /usr/share/nginx/html
|
||||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
COPY --from=mime-types /tmp/mime.types /etc/nginx/mime.types
|
||||||
|
|
21
nginx.conf
21
nginx.conf
|
@ -1,21 +0,0 @@
|
||||||
# vim:set et sw=4 ts=4:
|
|
||||||
|
|
||||||
server {
|
|
||||||
listen 80;
|
|
||||||
server_name localhost;
|
|
||||||
|
|
||||||
location / {
|
|
||||||
root /usr/share/nginx/html;
|
|
||||||
index index.html index.htm;
|
|
||||||
}
|
|
||||||
|
|
||||||
error_page 500 502 503 504 /50x.html;
|
|
||||||
location = /50x.html {
|
|
||||||
root /usr/share/nginx/html;
|
|
||||||
}
|
|
||||||
|
|
||||||
location ~* \.vcf$ {
|
|
||||||
default_type text/vcard;
|
|
||||||
root /usr/share/nginx/html;
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in New Issue