mirror of
https://github.com/System-End/scraps.git
synced 2026-04-19 16:28:20 +00:00
24 lines
422 B
Docker
24 lines
422 B
Docker
# Build stage
|
|
FROM oven/bun:1 AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package.json bun.lock ./
|
|
RUN bun install --frozen-lockfile
|
|
|
|
COPY . .
|
|
|
|
ARG PUBLIC_API_URL
|
|
ENV PUBLIC_API_URL=$PUBLIC_API_URL
|
|
|
|
RUN bun run build
|
|
|
|
# Production stage - serve static files with nginx
|
|
FROM nginx:alpine
|
|
|
|
COPY --from=builder /app/build /usr/share/nginx/html
|
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
EXPOSE 80
|
|
|
|
CMD ["nginx", "-g", "daemon off;"]
|