Skip to content

Commit

Permalink
chore: pnpm-workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
Timeraa committed Mar 28, 2023
1 parent e162677 commit 022d0a8
Show file tree
Hide file tree
Showing 58 changed files with 3,493 additions and 4,072 deletions.
File renamed without changes.
6 changes: 4 additions & 2 deletions .github/workflows/CD-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ jobs:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: "Recodive/Workflows/.github/workflows/CD Docker.yml@main"
with:
context: master/.
file: apps/master/Dockerfile
context: .
tags: premid/api-master
version: dev-${{ github.sha }}-${{ github.run_number }}
secrets:
Expand All @@ -26,7 +27,8 @@ jobs:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: "Recodive/Workflows/.github/workflows/CD Docker.yml@main"
with:
context: worker/.
file: apps/worker/Dockerfile
context: .
tags: premid/api-worker
version: dev-${{ github.sha }}-${{ github.run_number }}
secrets:
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/CD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ jobs:
docker-master:
uses: "Recodive/Workflows/.github/workflows/CD Docker.yml@main"
with:
context: master/.
file: apps/master/Dockerfile
context: .
tags: premid/api-master
version: ${{ github.ref_name }}
secrets:
Expand All @@ -20,7 +21,8 @@ jobs:
docker-worker:
uses: "Recodive/Workflows/.github/workflows/CD Docker.yml@main"
with:
context: worker/.
file: apps/worker/Dockerfile
context: .
tags: premid/api-worker
version: ${{ github.ref_name }}
secrets:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ jobs:
with:
node-version: "lts/*"
cache: "pnpm"
- run: pnpm run init
- run: pnpm build
- run: pnpm i --frozen-lockfile
- run: pnpm -r build
26 changes: 26 additions & 0 deletions apps/master/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM node:lts-alpine as base

WORKDIR /app

RUN corepack enable

FROM base as builder

RUN echo pnpm -v

COPY pnpm-lock.yaml ./
RUN pnpm fetch

COPY . .
RUN pnpm i
RUN pnpm --filter=./apps/master build
RUN pnpm --filter=./apps/master deploy --prod pruned

FROM base

ENV NODE_ENV=production

COPY --from=builder /app/pruned/dist ./
COPY --from=builder /app/pruned/node_modules ./node_modules

CMD ["node", "index.js"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
28 changes: 28 additions & 0 deletions apps/worker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM node:lts-alpine as base

WORKDIR /app

RUN corepack enable

FROM base as builder

RUN echo pnpm -v

COPY pnpm-lock.yaml ./
RUN pnpm fetch

COPY . .
RUN pnpm i
RUN pnpm --filter=./apps/worker build
RUN pnpm --filter=./apps/worker deploy --prod pruned

FROM base

ENV NODE_ENV=production

COPY --from=builder /app/pruned/dist ./
COPY --from=builder /app/pruned/node_modules ./node_modules

EXPOSE 3001

CMD ["node", "index.js"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 0 additions & 20 deletions master/Dockerfile

This file was deleted.

Loading

0 comments on commit 022d0a8

Please sign in to comment.