diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 2ac7439..e58253c 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -1,10 +1,14 @@ -FROM node:20-alpine AS builder +# Use Bun base image for builder +FROM oven/bun:1-alpine AS builder WORKDIR /app # Copy package files COPY package*.json ./ -RUN npm ci +COPY bun.lockb* ./ + +# Install dependencies with Bun +RUN bun install --frozen-lockfile # Copy source files COPY . . @@ -14,14 +18,11 @@ ENV VITE_API_URL=http://localhost/api ENV VITE_WS_URL=ws://localhost/ws ENV VITE_STREAM_PORT=8088 -# Generate .svelte-kit directory -RUN npx svelte-kit sync - # Build the application -RUN npm run build +RUN bun run build -# Production stage -FROM node:20-alpine +# Production stage - can still use Bun +FROM oven/bun:1-alpine WORKDIR /app @@ -30,7 +31,7 @@ COPY --from=builder /app/build ./build COPY --from=builder /app/package*.json ./ # Install production dependencies only -RUN npm ci --omit=dev +RUN bun install --production # Expose port EXPOSE 3000 @@ -38,4 +39,5 @@ EXPOSE 3000 # Set environment to production ENV NODE_ENV=production -CMD ["node", "build"] \ No newline at end of file +# Run with Bun +CMD ["bun", "run", "build/index.js"] \ No newline at end of file diff --git a/frontend/package.json b/frontend/package.json index d5c8d64..59d9577 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -24,7 +24,7 @@ "@fortawesome/fontawesome-free": "^6.7.2", "hls.js": "^1.6.7", "mdb-ui-kit": "^9.1.0", - "openpgp": "^5.11.0", + "openpgp": "^6.0.0-alpha.0", "ovenplayer": "^0.10.43" }, "type": "module" diff --git a/text.txt b/text.txt index 65c8c94..864b8b1 100644 --- a/text.txt +++ b/text.txt @@ -1,5 +1,5 @@ Folder PATH listing -Volume serial number is 000001F9 1430:6C90 +Volume serial number is 000001E9 1430:6C90 C:\USERS\ADMINISTRATOR\DESKTOP\PUB\REALMS.INDIA ¦ .env ¦ docker @@ -6054,13 +6054,17 @@ vite.config.ts.timestamp-* ### C:\Users\Administrator\Desktop\pub\realms.india\frontend\Dockerfile ### -FROM node:20-alpine AS builder +# Use Bun base image for builder +FROM oven/bun:1-alpine AS builder WORKDIR /app # Copy package files COPY package*.json ./ -RUN npm ci +COPY bun.lockb* ./ + +# Install dependencies with Bun +RUN bun install --frozen-lockfile # Copy source files COPY . . @@ -6070,14 +6074,11 @@ ENV VITE_API_URL=http://localhost/api ENV VITE_WS_URL=ws://localhost/ws ENV VITE_STREAM_PORT=8088 -# Generate .svelte-kit directory -RUN npx svelte-kit sync - # Build the application -RUN npm run build +RUN bun run build -# Production stage -FROM node:20-alpine +# Production stage - can still use Bun +FROM oven/bun:1-alpine WORKDIR /app @@ -6086,7 +6087,7 @@ COPY --from=builder /app/build ./build COPY --from=builder /app/package*.json ./ # Install production dependencies only -RUN npm ci --omit=dev +RUN bun install --production # Expose port EXPOSE 3000 @@ -6094,7 +6095,8 @@ EXPOSE 3000 # Set environment to production ENV NODE_ENV=production -CMD ["node", "build"] +# Run with Bun +CMD ["bun", "run", "build/index.js"] ### C:\Users\Administrator\Desktop\pub\realms.india\frontend\package.json ### @@ -6125,7 +6127,7 @@ CMD ["node", "build"] "@fortawesome/fontawesome-free": "^6.7.2", "hls.js": "^1.6.7", "mdb-ui-kit": "^9.1.0", - "openpgp": "^5.11.0", + "openpgp": "^6.0.0-alpha.0", "ovenplayer": "^0.10.43" }, "type": "module"