feat: 新增docker配置

This commit is contained in:
wanglihui 2023-07-08 15:29:32 +08:00
parent 885a189845
commit d023507ce9
3 changed files with 26 additions and 0 deletions

4
.dockerignore Normal file
View File

@ -0,0 +1,4 @@
# 文件
node_modules
test
.git

8
Dockerfile Normal file
View File

@ -0,0 +1,8 @@
# 引用镜像
FROM nginx:latest
LABEL maintainer="zp"
# 将项目根目录下dist文件夹下的所有文件复制到镜像中 /usr/share/nginx/html/ 目录下
COPY dist/ /usr/share/nginx/html/
COPY default.conf /etc/nginx/conf.d/default.conf

14
default.conf Normal file
View File

@ -0,0 +1,14 @@
server {
listen 8084;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}