cut / Dockerfile
Surf Studio
Surf Mystery Box 赠链追踪:X + Telegram 采集、名额检查、企业微信推送
94b4ce6
Raw History Blame Contribute Delete
603 Bytes
# Surf Mystery Box 赠链追踪 — Hugging Face Spaces image
# Stage 1: build the Vite frontend
FROM oven/bun:1-slim AS web
WORKDIR /web
COPY frontend/package.json frontend/bun.lock ./
RUN bun install
COPY frontend/ ./
# Served from the domain root, so assets use relative paths.
ENV BASE_PATH=""
RUN bun run build:client
# Stage 2: backend + API + static files on one port
FROM oven/bun:1-slim
WORKDIR /app
ENV NODE_ENV=production \
PORT=7860
COPY package.json bun.lock ./
RUN bun install --production
COPY . .
COPY --from=web /web/dist/client ./public
EXPOSE 7860
CMD ["bun", "server.js"]