add dockerfile & nginx config

pull/34/head^2
wmsjhappy@gmail.com 2023-10-06 22:10:56 +08:00
parent ef9e02bf47
commit 299d679450
2 changed files with 46 additions and 0 deletions

26
Dockerfile 100644
View File

@ -0,0 +1,26 @@
FROM nginx:1.17.9-alpine
LABEL maintainer="clibing <wmsjhappy@gmail.com>"
ARG TZ='Asia/Shanghai'
ENV TZ ${TZ}
RUN apk upgrade --update \
&& apk add bash \
&& ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \
&& echo ${TZ} > /etc/timezone \
&& rm -rf /usr/share/nginx/html /var/cache/apk/*
COPY nginx.vh.default.conf /etc/nginx/conf.d/default.conf
COPY dist /usr/share/nginx/html
RUN chown -R nginx /usr/share/nginx/html
EXPOSE 80
STOPSIGNAL SIGTERM
CMD ["nginx", "-g", "daemon off;"]

View File

@ -0,0 +1,20 @@
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
root /usr/share/nginx/html;
index index.html index.htm;
location / {
try_files $uri $uri/index.html $uri/index.htm /index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}