Upload docker image to GHCR & deploy to kubernetes cluster

This commit is contained in:
2024-03-03 18:10:46 +01:00
parent 71e053297e
commit 6d2550f2f3
8 changed files with 202 additions and 19 deletions

18
Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
# Build the project
FROM node:18-alpine AS builder
WORKDIR /app
COPY . .
RUN yarn
RUN yarn build
FROM node:18-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" ]