Initial commit: CarrotAssistant admin console (React + Vite + TS)

This commit is contained in:
2026-07-06 16:10:53 +08:00
commit 08355d3a98
31 changed files with 3439 additions and 0 deletions

15
Dockerfile Normal file
View File

@@ -0,0 +1,15 @@
# Build the admin SPA, then serve it with nginx. nginx also reverse-proxies
# /admin and /api to the backend container so the whole stack is reachable
# through a single origin (no CORS hassle in production).
FROM node:22-bookworm-slim AS builder
WORKDIR /src
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM nginx:1.27-bookworm
COPY --from=builder /src/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80