feat: add java control plane container baseline

This commit is contained in:
wlx committed 2026-08-31 14:48:02 +08:00
1 parent 2897354dd8
commit 1615401185
18 files changed
+566

No files matched your search

+5
View File
@@ -0,0 +1,5 @@
.git
.idea
node_modules
dist
*.log
+17
View File
@@ -0,0 +1,17 @@
FROM node:22-alpine AS build
WORKDIR /app
RUN corepack enable
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
COPY . .
ARG VITE_CONTROL_PLANE_URL=/
ARG VITE_AUTH_MODE=remote
ENV VITE_CONTROL_PLANE_URL=$VITE_CONTROL_PLANE_URL
ENV VITE_AUTH_MODE=$VITE_AUTH_MODE
RUN pnpm build
FROM nginx:1.27-alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
+36
View File
@@ -0,0 +1,36 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
location /api/ {
proxy_pass http://moyi-api:8787;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Cookie $http_cookie;
}
location /v1/ {
proxy_pass http://moyi-api:8787;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Authorization $http_authorization;
proxy_set_header Content-Type $http_content_type;
}
location = /health {
proxy_pass http://moyi-api:8787/health;
}
location / {
try_files $uri $uri/ /index.html;
}
}