Spaces:
Sleeping
Sleeping
FROM oven/bun:1 as build | |
# Set working directory | |
WORKDIR /app | |
# Copy package files | |
COPY viewer/package.json viewer/bun.lockb ./ | |
# Install dependencies | |
RUN bun install --frozen-lockfile | |
# Copy project files (respecting .dockerignore) | |
COPY viewer/ ./ | |
# Build the application | |
RUN bun run build | |
# Production stage | |
FROM nginx:alpine | |
# Copy built assets from build stage | |
COPY --from=build /app/dist /usr/share/nginx/html | |
# Copy nginx configuration if needed | |
# COPY nginx.conf /etc/nginx/conf.d/default.conf | |
# Expose port | |
EXPOSE 80 | |
# Start nginx | |
CMD ["nginx", "-g", "daemon off;"] | |