From f0b5d6d5ec2b51eb3991c4894a32c3673b885781 Mon Sep 17 00:00:00 2001 From: RainSun Date: Fri, 10 Apr 2020 20:45:25 +0800 Subject: [PATCH] add docker --- Dockerfile | 3 +++ nginx/default.conf | 17 +++++++++++++++++ public/index.html | 6 +++--- src/axios/fetch.js | 4 ++-- 4 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 Dockerfile create mode 100644 nginx/default.conf diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..76819a8 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,3 @@ +FROM nginx +COPY dist/ /usr/share/nginx/html/ +COPY nginx/default.conf /etc/nginx/conf.d/default.conf \ No newline at end of file diff --git a/nginx/default.conf b/nginx/default.conf new file mode 100644 index 0000000..790cda0 --- /dev/null +++ b/nginx/default.conf @@ -0,0 +1,17 @@ +server { + listen 80; + server_name localhost; + + access_log /var/log/nginx/host.access.log main; + error_log /var/log/nginx/error.log error; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + try_files $uri $uri/ /index.html; + } + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } +} \ No newline at end of file diff --git a/public/index.html b/public/index.html index 1c7834b..17eae76 100644 --- a/public/index.html +++ b/public/index.html @@ -6,16 +6,16 @@ - 曳光 + 曳光控制台 - + - +