This commit is contained in:
yml
2026-04-08 16:30:42 +08:00
commit 313c036845
131 changed files with 22393 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
{$APP_DOMAIN:localhost} {
route {
handle /api/* {
reverse_proxy backend:3000
}
handle /health {
reverse_proxy backend:3000
}
encode zstd gzip
root * /srv
try_files {path} /index.html
file_server
}
}
+29
View File
@@ -0,0 +1,29 @@
FROM node:22-bookworm
ENV DEBIAN_FRONTEND=noninteractive
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
ENV UV_LINK_MODE=copy
WORKDIR /app
RUN apt-get update \
&& apt-get install -y --no-install-recommends curl ca-certificates python3 python3-pip \
&& rm -rf /var/lib/apt/lists/*
RUN curl -LsSf https://astral.sh/uv/install.sh | sh \
&& ln -sf /root/.local/bin/uv /usr/local/bin/uv
COPY apps/backend/package.json apps/backend/package-lock.json ./
RUN npm ci
RUN npx playwright install --with-deps chromium
COPY apps/backend/ ./
RUN uv sync --directory subservices/ocr-worker --frozen
RUN mkdir -p /app/data /app/data/browser-sessions /app/data/redeem-screenshots
EXPOSE 3000
CMD ["npm", "run", "start"]
+14
View File
@@ -0,0 +1,14 @@
FROM node:22-bookworm AS builder
WORKDIR /app
COPY apps/frontend/package.json apps/frontend/package-lock.json ./
RUN npm install
COPY apps/frontend/ ./
RUN npm run build
FROM caddy:2-alpine
COPY deploy/caddy/Caddyfile /etc/caddy/Caddyfile
COPY --from=builder /app/dist /srv