forked from Mirrors/keyoxide-web
26 lines
No EOL
470 B
Docker
26 lines
No EOL
470 B
Docker
FROM node:20-alpine as builder
|
|
|
|
WORKDIR /app
|
|
COPY . .
|
|
|
|
RUN yarn --pure-lockfile
|
|
RUN yarn run build:server
|
|
RUN yarn run build:static
|
|
|
|
###
|
|
|
|
FROM node:20-alpine
|
|
|
|
ENV CI_COMMIT_SHA
|
|
ENV CI_COMMIT_BRANCH
|
|
|
|
WORKDIR /app
|
|
COPY --from=builder /app/package.json /app/package.json
|
|
COPY --from=builder /app/dist /app/dist
|
|
COPY --from=builder /app/content /app/content
|
|
COPY --from=builder /app/views /app/views
|
|
COPY --from=builder /app/static /app/static
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD node ./dist/ |