Spaces:
Sleeping
Sleeping
File size: 603 Bytes
94b4ce6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | # 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"]
|