replace npm w/ bun
This commit is contained in:
parent
1d42a9a623
commit
007263977b
3 changed files with 27 additions and 23 deletions
|
|
@ -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
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy package files
|
# Copy package files
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm ci
|
COPY bun.lockb* ./
|
||||||
|
|
||||||
|
# Install dependencies with Bun
|
||||||
|
RUN bun install --frozen-lockfile
|
||||||
|
|
||||||
# Copy source files
|
# Copy source files
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
@ -14,14 +18,11 @@ ENV VITE_API_URL=http://localhost/api
|
||||||
ENV VITE_WS_URL=ws://localhost/ws
|
ENV VITE_WS_URL=ws://localhost/ws
|
||||||
ENV VITE_STREAM_PORT=8088
|
ENV VITE_STREAM_PORT=8088
|
||||||
|
|
||||||
# Generate .svelte-kit directory
|
|
||||||
RUN npx svelte-kit sync
|
|
||||||
|
|
||||||
# Build the application
|
# Build the application
|
||||||
RUN npm run build
|
RUN bun run build
|
||||||
|
|
||||||
# Production stage
|
# Production stage - can still use Bun
|
||||||
FROM node:20-alpine
|
FROM oven/bun:1-alpine
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|
@ -30,7 +31,7 @@ COPY --from=builder /app/build ./build
|
||||||
COPY --from=builder /app/package*.json ./
|
COPY --from=builder /app/package*.json ./
|
||||||
|
|
||||||
# Install production dependencies only
|
# Install production dependencies only
|
||||||
RUN npm ci --omit=dev
|
RUN bun install --production
|
||||||
|
|
||||||
# Expose port
|
# Expose port
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
@ -38,4 +39,5 @@ EXPOSE 3000
|
||||||
# Set environment to production
|
# Set environment to production
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
|
|
||||||
CMD ["node", "build"]
|
# Run with Bun
|
||||||
|
CMD ["bun", "run", "build/index.js"]
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
"@fortawesome/fontawesome-free": "^6.7.2",
|
"@fortawesome/fontawesome-free": "^6.7.2",
|
||||||
"hls.js": "^1.6.7",
|
"hls.js": "^1.6.7",
|
||||||
"mdb-ui-kit": "^9.1.0",
|
"mdb-ui-kit": "^9.1.0",
|
||||||
"openpgp": "^5.11.0",
|
"openpgp": "^6.0.0-alpha.0",
|
||||||
"ovenplayer": "^0.10.43"
|
"ovenplayer": "^0.10.43"
|
||||||
},
|
},
|
||||||
"type": "module"
|
"type": "module"
|
||||||
|
|
|
||||||
26
text.txt
26
text.txt
|
|
@ -1,5 +1,5 @@
|
||||||
Folder PATH listing
|
Folder PATH listing
|
||||||
Volume serial number is 000001F9 1430:6C90
|
Volume serial number is 000001E9 1430:6C90
|
||||||
C:\USERS\ADMINISTRATOR\DESKTOP\PUB\REALMS.INDIA
|
C:\USERS\ADMINISTRATOR\DESKTOP\PUB\REALMS.INDIA
|
||||||
¦ .env
|
¦ .env
|
||||||
¦ docker
|
¦ docker
|
||||||
|
|
@ -6054,13 +6054,17 @@ vite.config.ts.timestamp-*
|
||||||
|
|
||||||
### C:\Users\Administrator\Desktop\pub\realms.india\frontend\Dockerfile ###
|
### 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
|
WORKDIR /app
|
||||||
|
|
||||||
# Copy package files
|
# Copy package files
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm ci
|
COPY bun.lockb* ./
|
||||||
|
|
||||||
|
# Install dependencies with Bun
|
||||||
|
RUN bun install --frozen-lockfile
|
||||||
|
|
||||||
# Copy source files
|
# Copy source files
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
@ -6070,14 +6074,11 @@ ENV VITE_API_URL=http://localhost/api
|
||||||
ENV VITE_WS_URL=ws://localhost/ws
|
ENV VITE_WS_URL=ws://localhost/ws
|
||||||
ENV VITE_STREAM_PORT=8088
|
ENV VITE_STREAM_PORT=8088
|
||||||
|
|
||||||
# Generate .svelte-kit directory
|
|
||||||
RUN npx svelte-kit sync
|
|
||||||
|
|
||||||
# Build the application
|
# Build the application
|
||||||
RUN npm run build
|
RUN bun run build
|
||||||
|
|
||||||
# Production stage
|
# Production stage - can still use Bun
|
||||||
FROM node:20-alpine
|
FROM oven/bun:1-alpine
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
|
@ -6086,7 +6087,7 @@ COPY --from=builder /app/build ./build
|
||||||
COPY --from=builder /app/package*.json ./
|
COPY --from=builder /app/package*.json ./
|
||||||
|
|
||||||
# Install production dependencies only
|
# Install production dependencies only
|
||||||
RUN npm ci --omit=dev
|
RUN bun install --production
|
||||||
|
|
||||||
# Expose port
|
# Expose port
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
@ -6094,7 +6095,8 @@ EXPOSE 3000
|
||||||
# Set environment to production
|
# Set environment to production
|
||||||
ENV NODE_ENV=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 ###
|
### C:\Users\Administrator\Desktop\pub\realms.india\frontend\package.json ###
|
||||||
|
|
@ -6125,7 +6127,7 @@ CMD ["node", "build"]
|
||||||
"@fortawesome/fontawesome-free": "^6.7.2",
|
"@fortawesome/fontawesome-free": "^6.7.2",
|
||||||
"hls.js": "^1.6.7",
|
"hls.js": "^1.6.7",
|
||||||
"mdb-ui-kit": "^9.1.0",
|
"mdb-ui-kit": "^9.1.0",
|
||||||
"openpgp": "^5.11.0",
|
"openpgp": "^6.0.0-alpha.0",
|
||||||
"ovenplayer": "^0.10.43"
|
"ovenplayer": "^0.10.43"
|
||||||
},
|
},
|
||||||
"type": "module"
|
"type": "module"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue