Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions roverctl-web/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Source: https://gist.github.com/aradalvand/04b2cad14b00e5ffe8ec96a3afbb34fb
FROM node:20-alpine AS builder
FROM oven/bun:1-alpine AS builder
WORKDIR /app
COPY package*.json .
RUN npm ci
COPY bun.lockb* .
RUN bun install --frozen-lockfile
COPY . .
# These are runtime arguments, but they do need to exist at built time to be able to import from public in svelte
ARG PUBLIC_ROVERD_HOST=""
Expand All @@ -12,14 +13,14 @@ ARG PUBLIC_ROVERD_PASSWORD=""
ARG PUBLIC_PASSTHROUGH_HOST=""
ARG PUBLIC_PASSTHROUGH_PORT=""

RUN npm run build
RUN npm prune --production
RUN bun run build
RUN bun install --production --frozen-lockfile

FROM node:20-alpine
FROM oven/bun:1-alpine
WORKDIR /app
COPY --from=builder /app/build build/
COPY --from=builder /app/node_modules node_modules/
COPY package.json .
EXPOSE 3000
ENV NODE_ENV=production
CMD [ "node", "build" ]
CMD [ "bun", "run", "build/index.js" ]
Loading