add dockerfile & nginx config
parent
ef9e02bf47
commit
299d679450
|
@ -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;"]
|
||||
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue