From 65c1f42c9a51c53bf1bd9349f9f701ed41593f8e Mon Sep 17 00:00:00 2001 From: "ewen.zhang" Date: Fri, 26 May 2023 10:58:21 +0100 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0docker=E6=89=93=E5=8C=85?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/settings.json | 3 +++ build/Dockerfile | 10 ++++++++++ build/nginx.conf | 25 +++++++++++++++++++++++++ 3 files changed, 38 insertions(+) create mode 100644 .vscode/settings.json create mode 100644 build/Dockerfile create mode 100644 build/nginx.conf diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..17dc7a4 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "i18n-ally.localesPaths": ["src/i18n"] +} diff --git a/build/Dockerfile b/build/Dockerfile new file mode 100644 index 0000000..48e3c59 --- /dev/null +++ b/build/Dockerfile @@ -0,0 +1,10 @@ +FROM dreamacro/clash:v1.16.0 + +EXPOSE 8080 + +RUN apk update && apk add nginx + +COPY ./dist/ /dashboard +COPY ./build/nginx.conf /etc/nginx + +CMD nginx && /clash \ No newline at end of file diff --git a/build/nginx.conf b/build/nginx.conf new file mode 100644 index 0000000..81bbfa6 --- /dev/null +++ b/build/nginx.conf @@ -0,0 +1,25 @@ +worker_processes 1; + +events { + worker_connections 1024; +} + +http { + include mime.types; + sendfile on; + keepalive_timeout 65; + + server { + listen 8080; + server_name localhost; + default_type 'text/html'; + charset utf-8; + + location / { + root /dashboard; + } + + error_page 404 /404.html; + error_page 500 502 503 504 /50x.html; + } +}