always build using bun
This commit is contained in:
parent
45dfe1a1c7
commit
25c825be38
2 changed files with 16 additions and 18 deletions
32
Dockerfile
32
Dockerfile
|
@ -1,35 +1,33 @@
|
|||
FROM node:20-alpine AS builder
|
||||
|
||||
RUN mkdir -p /data && chown node:node /data
|
||||
FROM oven/bun:alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json .
|
||||
RUN npm install
|
||||
RUN apk add git
|
||||
|
||||
COPY package.json ./
|
||||
RUN bun install
|
||||
COPY . .
|
||||
|
||||
RUN npm run build
|
||||
RUN mkdir -p /data \
|
||||
&& touch /data/portal-btc.db \
|
||||
&& chown -R bun:bun /app /data
|
||||
|
||||
FROM node:20-alpine
|
||||
RUN bun run build
|
||||
|
||||
FROM oven/bun:alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
|
||||
|
||||
COPY package.json .
|
||||
RUN npm install --omit=dev
|
||||
|
||||
RUN mkdir -p /data
|
||||
RUN touch /data/portal-btc.db
|
||||
COPY --from=builder /app/node_modules ./node_modules
|
||||
COPY --from=builder /app/package.json ./package.json
|
||||
COPY --from=builder /app/bun.lock ./bun.lock
|
||||
|
||||
COPY --from=builder /app/build .
|
||||
|
||||
VOLUME /data
|
||||
RUN chown -R appuser:appgroup /app /data
|
||||
|
||||
USER appuser
|
||||
USER bun
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["node", "index.js"]
|
||||
CMD ["bun", "index.js"]
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
"dexie": "^4.0.11",
|
||||
"iconify-icon": "^3.0.0",
|
||||
"nostr-tools": "^2.15.0",
|
||||
"portalbtc-lib": "git+ssh://git@git.arx-ccn.com:222/Arx/PortalBTCLib.git#2d858727b05f9d66e4f028c086d93cebf769f3b8",
|
||||
"portalbtc-lib": "git+https://git.arx-ccn.com/Arx/PortalBTCLib.git#2d858727b05f9d66e4f028c086d93cebf769f3b8",
|
||||
"qrcode": "^1.5.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue