This repository has been archived by the owner on Aug 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
938 additions
and
401 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules/ | ||
dist/ | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FROM node:20-slim AS build | ||
RUN npm config set registry https://registry.npmmirror.com | ||
|
||
COPY . /usr/src/app | ||
WORKDIR /usr/src/app | ||
RUN npm install pnpm -g && \ | ||
pnpm install --frozen-lockfile | ||
|
||
# RUN pnpm --filter "./apps/**" build | ||
RUN pnpm --filter=@apps/admin build | ||
RUN pnpm deploy --filter=@apps/admin --prod /prod/admin | ||
# RUN pnpm deploy --filter=@apps/gf-vben --prod /prod/gf-vben | ||
|
||
FROM nginx:1.24.0-alpine as admin | ||
COPY --from=build /prod/admin/dist /usr/share/nginx/html | ||
COPY --from=build /usr/src/app/nginx.conf /etc/nginx/nginx.conf | ||
EXPOSE 80 | ||
CMD ["nginx", "-g", "daemon off;"] | ||
|
||
#FROM nginx:1.24.0-alpine as gf-vben | ||
#COPY --from=build /prod/gf-vben /usr/share/nginx/html | ||
#COPY --from=build /app/nginx.conf /etc/nginx/nginx.conf | ||
#EXPOSE 80 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
user nginx; | ||
worker_processes 1; | ||
|
||
error_log /var/log/nginx/error.log warn; | ||
pid /var/run/nginx.pid; | ||
events { | ||
worker_connections 1024; | ||
} | ||
|
||
http { | ||
include mime.types; | ||
default_type application/octet-stream; | ||
server { | ||
listen 80; | ||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html; | ||
try_files $uri $uri/ /index.html; | ||
index index.html; | ||
} | ||
error_page 500 502 503 504 /50x.html; | ||
location = /50x.html { | ||
root /usr/share/nginx/html; | ||
} | ||
} | ||
} |
Oops, something went wrong.