File tree 2 files changed +10
-14
lines changed
2 files changed +10
-14
lines changed Original file line number Diff line number Diff line change 1
- FROM node:lts-alpine AS base
1
+ FROM node:lts-alpine AS builder
2
2
3
3
ARG ZANE_DOMAINS
4
4
ENV ZANE_DOMAINS=$ZANE_DOMAINS
5
+ ENV FORCE_COLOR=true
5
6
6
- # Install additionnal dependencies for bun, ref : https://github.com/oven-sh/bun/issues/5545
7
- RUN apk --no-cache add ca-certificates wget
8
- RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub
9
- RUN wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.28-r0/glibc-2.28-r0.apk
10
- RUN apk add --no-cache --force-overwrite glibc-2.28-r0.apk
11
-
12
- # Install bun
13
- RUN npm install -g bun
7
+ # install pnpm
8
+ RUN npm install -g pnpm@8
14
9
15
10
# Install packages
16
11
WORKDIR /usr/src/app
17
- COPY . /usr/src/app
18
- COPY ./package.json bun.lockb /usr/src/app/
19
- RUN FORCE_COLOR=true bun install --frozen-lockfile
12
+ COPY package.json ./pnpm-lock.yaml ./
13
+ RUN pnpm install --frozen-lockfile
20
14
21
15
# run build
22
- RUN FORCE_COLOR=true bun run build
16
+ COPY . ./
17
+ RUN pnpm run build
23
18
19
+ # ## Production phase
24
20
FROM caddy:2.9-alpine as production
25
21
26
22
LABEL org.opencontainers.image.source = "https://github.com/zane-ops/docs"
27
23
28
24
WORKDIR /var/www/html
29
25
30
- COPY --from=build-env /usr/src/app/dist ./
26
+ COPY --from=builder /usr/src/app/dist ./
31
27
COPY ./Caddyfile /etc/caddy/Caddyfile
You can’t perform that action at this time.
0 commit comments