From 9f95862ab96afcc7e391faff48f10c64f53c1438 Mon Sep 17 00:00:00 2001 From: thehrz Date: Sat, 5 Aug 2023 11:10:51 +0800 Subject: [PATCH] feat: add nginx config --- Dockerfile | 1 + nginx/root.conf | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 nginx/root.conf diff --git a/Dockerfile b/Dockerfile index fa95192..6a5dcc5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,6 +12,7 @@ RUN pnpm build FROM nginx:stable-alpine as production-stage +COPY --from=build-stage /app/nginx /etc/nginx/ COPY --from=build-stage /app/dist /usr/share/nginx/html EXPOSE 80 diff --git a/nginx/root.conf b/nginx/root.conf new file mode 100644 index 0000000..50d44c9 --- /dev/null +++ b/nginx/root.conf @@ -0,0 +1,10 @@ +server { + listen 80; + listen [::]:80; + server_name test.thehrz.net; + + location / { + root /usr/local/nginx/html/; + try_files $uri $uri/ /index.html; + } +} \ No newline at end of file