Files
maps-service/web/Containerfile
itzaname 30db1cc375
All checks were successful
continuous-integration/drone/push Build is passing
Fix the build issues
2025-12-25 19:52:01 -05:00

30 lines
606 B
Docker

# Build stage
FROM registry.itzana.me/docker-proxy/oven/bun:1.3.3 AS builder
WORKDIR /app
COPY package.json bun.lockb* ./
RUN bun install --frozen-lockfile
COPY . .
RUN bun run build
# Release
FROM registry.itzana.me/docker-proxy/nginx:alpine
COPY --from=builder /app/build /usr/share/nginx/html
# Add nginx configuration for SPA routing
RUN echo 'server { \
listen 3000; \
location / { \
root /usr/share/nginx/html; \
index index.html; \
try_files $uri $uri/ /index.html; \
} \
}' > /etc/nginx/conf.d/default.conf
EXPOSE 3000
CMD ["nginx", "-g", "daemon off;"]