From 5db5034765be65afc4fca41446777ef7e6153e38 Mon Sep 17 00:00:00 2001 From: Jay Date: Fri, 24 Aug 2018 22:35:14 +0800 Subject: [PATCH] update --- Dockerfile | 4 ++-- nginx.conf | 7 ++----- vue.config.js | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index fae02b9..dc75946 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ FROM nginx:alpine LABEL maintainer="Jay " -ARG PREFIX +# ARG PREFIX RUN mkdir -p /data WORKDIR /data COPY dist/ /data COPY nginx.conf /etc/nginx/conf.d/default.conf -RUN sed -i 's@\$\$prefix\$\$@'${PREFIX}'@' /etc/nginx/conf.d/default.conf +# RUN sed -i 's@\$\$prefix\$\$@'${PREFIX}'@' /etc/nginx/conf.d/default.conf EXPOSE 80 CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/nginx.conf b/nginx.conf index 71974e8..cb3403a 100644 --- a/nginx.conf +++ b/nginx.conf @@ -4,15 +4,12 @@ server { #charset koi8-r; #access_log /var/log/nginx/host.access.log main; - + port_in_redirect off; root /data; index index.html; - location ^~ $$prefix$$/ { + location /web { alias /data/; - } - - location / { try_files $uri $uri/ /index.html; } } diff --git a/vue.config.js b/vue.config.js index 0ed897c..c750eb4 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,3 +1,3 @@ module.exports = { - baseUrl: process.env.BASE_URL || '/' + baseUrl: process.env.BASE_URL || '/' } \ No newline at end of file