mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-08 15:05:22 +02:00
feat: Client Dockerfile
This commit is contained in:
parent
c744929506
commit
6933232cbb
2 changed files with 27 additions and 1 deletions
5
.github/workflows/docker-publish.yml
vendored
5
.github/workflows/docker-publish.yml
vendored
|
@ -20,7 +20,7 @@ jobs:
|
|||
id-token: write
|
||||
strategy:
|
||||
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:
|
||||
- image: "ghcr.io/${{ github.repository }}"
|
||||
dockerfile: "./apps/server/Dockerfile"
|
||||
|
@ -28,6 +28,9 @@ jobs:
|
|||
- image: "ghcr.io/${{ github.repository }}-worker"
|
||||
dockerfile: "./apps/workers/Dockerfile"
|
||||
nx: "workers:build"
|
||||
- image: "ghcr.io/${{ github.repository }}-client"
|
||||
dockerfile: "./apps/workers/Dockerfile"
|
||||
nx: "client:build"
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
|
23
apps/client/Dockerfile
Normal file
23
apps/client/Dockerfile
Normal 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"]
|
Loading…
Add table
Add a link
Reference in a new issue