From ab0174c2e2afcd1b2ff971220deb5f6db8db714b Mon Sep 17 00:00:00 2001 From: Eli Bosley Date: Thu, 31 Aug 2023 11:17:32 -0400 Subject: [PATCH] fix: rearrange build --- .github/workflows/pull-request.yml | 6 +++++- api/Dockerfile | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 736759aa5..317e4c4e6 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -44,6 +44,11 @@ jobs: cache-to: type=gha,mode=max lint-api: + services: + registry: # Using a local registry is ~3x faster than exporting the image to docker agent + image: registry:2 + ports: + - 5000:5000 needs: [build-cache] continue-on-error: true defaults: @@ -73,7 +78,6 @@ jobs: docker run localhost:5000/unraid-api:builder npm run lint test-api: - services: registry: # Using a local registry is ~3x faster than exporting the image to docker agent image: registry:2 diff --git a/api/Dockerfile b/api/Dockerfile index ec3b131a2..7348ac794 100644 --- a/api/Dockerfile +++ b/api/Dockerfile @@ -27,12 +27,12 @@ COPY tsconfig.json tsup.config.ts .eslintrc.cjs .npmrc .env.production .env.stag COPY package.json package-lock.json ./ -# Install deps -RUN npm i - # Install pkg RUN npm i -g pkg zx +# Install deps +RUN npm ci + EXPOSE 4000 ###########################################################