You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
465 B
18 lines
465 B
# build stage
|
|
FROM caddy:2-builder-alpine as xcaddy-stage
|
|
RUN xcaddy build --with github.com/ggicci/caddy-jwt
|
|
|
|
|
|
FROM node:12.22.12-bullseye as build-stage
|
|
WORKDIR /app
|
|
COPY package.json package-lock.json ./
|
|
RUN npm install
|
|
COPY . .
|
|
RUN npx browserslist@latest --update-db
|
|
RUN npm run build
|
|
|
|
# production stage
|
|
FROM caddy:2-alpine as production-stage
|
|
COPY --from=xcaddy-stage /usr/bin/caddy /usr/bin/caddy
|
|
COPY --from=build-stage /app/dist /usr/share/caddy
|
|
EXPOSE 80 |