Skip to content

Commit

Permalink
fix(jobs): use new docker image (#2945)
Browse files Browse the repository at this point in the history
## Describe your changes

- Jobs Use new docker image 
Already deployed in staging, nb: requires manual change before
deployment on prod
  • Loading branch information
bodinsamuel authored Nov 6, 2024
1 parent 0e111e9 commit 205cd94
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 39 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ concurrency:
cancel-in-progress: true

jobs:
nango-jobs:
uses: ./.github/workflows/push-container.yaml
secrets: inherit
with:
package: jobs
run-cmd: ts-build
tags: -t nangohq/nango-jobs:${{ github.event.pull_request.head.sha || github.sha }} ${{ github.ref == 'refs/heads/master' && format('-t nangohq/nango-jobs:enterprise-{0} -t nangohq/nango-jobs:enterprise -t nangohq/nango-jobs:hosted-{1} -t nangohq/nango-jobs:hosted', github.event.pull_request.head.sha || github.sha, github.event.pull_request.head.sha || github.sha) || '' }}
nango-runner:
uses: ./.github/workflows/push-container.yaml
secrets: inherit
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ jobs:
- name: Deploy jobs
run: |
SERVICE_ID=${{ fromJson('{ production: "srv-clvvtdug1b2c73cklps0", staging: "srv-clthttda73kc73ejflg0" }')[inputs.stage] }}
IMAGE_TAG_PREFIX=${{ fromJson('{ "production": "prod", "staging": "staging" }')[inputs.stage] }}
IMAGE="docker.io/nangohq/nango:${IMAGE_TAG_PREFIX}-${{ github.sha }}"
echo "Deploying $IMAGE to $SERVICE_ID"
curl --request POST "https://api.render.com/v1/services/$SERVICE_ID/deploys" --header "authorization: Bearer ${{ secrets.RENDER_API_KEY }}"
deploy_runners:
if: inputs.service == 'runner'
Expand Down
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,15 @@ RUN true \
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false

# Do not use root to run the app
USER node
# BUT it does not work with secret mount (could not find a solution yet)
# TODO: fix this
# USER node

WORKDIR /app/nango

# Code
COPY --from=build --chown=node:node /app/tmp /app/nango
# COPY --from=build --chown=node:node /app/tmp /app/nango
COPY --from=build /app/tmp /app/nango

ARG image_env
ARG git_hash
Expand Down
30 changes: 0 additions & 30 deletions packages/jobs/Dockerfile

This file was deleted.

0 comments on commit 205cd94

Please # to comment.