1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-09 07:25:19 +02:00

feat: Client Dockerfile

This commit is contained in:
Six 2024-01-16 18:29:04 -08:00
parent c744929506
commit 6933232cbb
No known key found for this signature in database
GPG key ID: 00148D3869C21E43
2 changed files with 27 additions and 1 deletions

View file

@ -20,7 +20,7 @@ jobs:
id-token: write id-token: write
strategy: strategy:
matrix: matrix:
image: ["ghcr.io/${{ github.repository }}", "ghcr.io/${{ github.repository }}-worker"] image: ["ghcr.io/${{ github.repository }}", "ghcr.io/${{ github.repository }}-worker", "ghcr.io/${{ github.repository }}-client"]
include: include:
- image: "ghcr.io/${{ github.repository }}" - image: "ghcr.io/${{ github.repository }}"
dockerfile: "./apps/server/Dockerfile" dockerfile: "./apps/server/Dockerfile"
@ -28,6 +28,9 @@ jobs:
- image: "ghcr.io/${{ github.repository }}-worker" - image: "ghcr.io/${{ github.repository }}-worker"
dockerfile: "./apps/workers/Dockerfile" dockerfile: "./apps/workers/Dockerfile"
nx: "workers:build" nx: "workers:build"
- image: "ghcr.io/${{ github.repository }}-client"
dockerfile: "./apps/workers/Dockerfile"
nx: "client:build"
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v3 uses: actions/checkout@v3

23
apps/client/Dockerfile Normal file
View file

@ -0,0 +1,23 @@
# ------------------------------------------
# BUILD STAGE
# ------------------------------------------
# Full Node image must be used for node_modules install
# TODO - Upgrade to v18.x (LTS) when this issue is resolved - https://github.com/prisma/prisma/issues/10649#issuecomment-1249209025
FROM node:16.18.1 as builder
WORKDIR /app
COPY ./dist/apps/client ./yarn.lock ./prisma ./
RUN yarn install --production
# ------------------------------------------
# PROD STAGE
# ------------------------------------------
FROM node:16.18.1-slim as prod
# Used for container health checks
RUN apt-get update && apt-get install curl -y
WORKDIR /app
USER node
COPY --from=builder /app .
CMD ["yarn", "run", "start"]