init datamate

This commit is contained in:
Dallas98
2025-10-21 23:00:48 +08:00
commit 1c97afed7d
692 changed files with 135442 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
FROM node:18-alpine AS builder
WORKDIR /app
COPY frontend ./
RUN if [ -f package-lock.json ]; then npm ci; else npm install; fi && \
npm run build
FROM nginx:1.29 AS runner
COPY --from=builder /app/dist /opt/frontend
COPY scripts/images/frontend/edm.conf /etc/nginx/conf.d/default.conf
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
CMD ["nginx", "-g", "daemon off;"]

View File

@@ -0,0 +1,16 @@
server {
listen 80;
server_name 0.0.0.0;
location /api/ {
proxy_pass http://backend:8080/api/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location / {
root /opt/frontend;
try_files $uri $uri/ /index.html;
}
}