feat: build wahrwelt A/D toolkit

This commit is contained in:
TakuyaYagam1 committed 2026-10-14 11:30:41 +03:00
1 parent 303438d206
commit 653924d8c6
564 files changed
+36310 -49998

No files matched your search

@@ -0,0 +1,26 @@
FROM node:slim AS build
ENV PNPM_HOME=/pnpm \
PATH=/pnpm:$PATH \
NODE_OPTIONS=--max-old-space-size=1536
WORKDIR /app
RUN npm install --global npm pnpm
COPY front/package.json front/pnpm-workspace.yaml ./
RUN --mount=type=cache,id=wahrwelt-farm-pnpm,target=/pnpm/store pnpm install --no-frozen-lockfile --lockfile=false
COPY front/ ./
RUN pnpm build
FROM nginxinc/nginx-unprivileged:alpine
USER root
RUN apk upgrade --no-cache
USER 101
COPY docker/front/app.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 8080
COPY --from=project /LICENSE /usr/share/licenses/wahrwelt/LICENSE
@@ -0,0 +1,34 @@
server {
listen 8080;
server_name _;
server_tokens off;
root /usr/share/nginx/html;
index index.html;
client_max_body_size 1m;
add_header X-Content-Type-Options nosniff always;
add_header X-Frame-Options DENY always;
add_header Referrer-Policy no-referrer always;
add_header Permissions-Policy "camera=(), geolocation=(), microphone=()" always;
location = /healthz {
access_log off;
add_header Content-Type text/plain;
return 200 "ok\n";
}
location /api/ {
proxy_pass http://farm:5000;
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_connect_timeout 5s;
proxy_read_timeout 30s;
}
location / {
try_files $uri $uri/ /index.html;
}
}