fix: use docker compose watch under dev
All checks were successful
Deploy to Production / deploy (push) Successful in 1m12s
All checks were successful
Deploy to Production / deploy (push) Successful in 1m12s
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
# Stage 0, "build-stage", based on Bun, to build and compile the frontend
|
||||
FROM oven/bun:1 AS build-stage
|
||||
# Shared Bun stage for frontend dependencies and sources
|
||||
FROM oven/bun:1 AS bun-base
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json bun.lock /app/
|
||||
|
||||
COPY frontend/package.json /app/frontend/
|
||||
|
||||
WORKDIR /app/frontend
|
||||
@@ -14,10 +13,22 @@ RUN bun install
|
||||
COPY ./frontend /app/frontend
|
||||
ARG VITE_API_URL
|
||||
|
||||
|
||||
# Development stage for docker compose watch + Vite HMR
|
||||
FROM bun-base AS dev-stage
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD ["bun", "run", "dev", "--host", "0.0.0.0", "--port", "80"]
|
||||
|
||||
|
||||
# Build stage for production assets
|
||||
FROM bun-base AS build-stage
|
||||
|
||||
RUN bun run build
|
||||
|
||||
|
||||
# Stage 1, based on Nginx, to have only the compiled app, ready for production with Nginx
|
||||
# Production stage serving compiled assets with Nginx
|
||||
FROM nginx:1
|
||||
|
||||
COPY --from=build-stage /app/frontend/dist/ /usr/share/nginx/html
|
||||
|
||||
Reference in New Issue
Block a user