Commit 8fab9f8f authored by 李超鹏's avatar 李超鹏

Dockerfile文件

parent bfe5a692
# 设置基础镜像
FROM nginx
# 用本地的 default.conf 配置来替换nginx镜像里的默认配置
COPY default.conf /etc/nginx/conf.d/default.conf
# 将dist文件中的内容复制到 /weixiuhui/application/web-site/weixiuapp 这个目录下面
COPY dist/dist.tar.gz /weixiuhui/application/web-site/weixiuapp/order-h5/
WORKDIR /weixiuhui/application/web-site/weixiuapp/order-h5/
RUN tar -xvf dist.tar.gz
# nginx配置
server {
listen 80;
server_name localhost;
#charset koi8-r;
access_log /var/log/nginx/host.access.log main;
error_log /var/log/nginx/error.log error;
location / {
# root 根目录,默认nginx镜像的html文件夹,可以指定其他
root /weixiuhui/application/web-site;
index index.html index.htm;
# 如果vue-router使用的是history模式,需要设置这个
#try_files $uri $uri/ @router;
}
location /weixiuapp/order-h5/ {
alias /weixiuhui/application/web-site/weixiuapp/order-h5/;
}
#location @router {
#rewrite ^.*$ /index.html last;
#}
#location ~* \.(eot|svg|ttf|woff)$ {
# add_header Access-Control-Allow-Origin *;
#}
#location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
#{
# expires 30d;
#}
#location ~ .*\.(js|css)?$
#{
# expires 12h;
#}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment