Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(jobs): use new docker image #2945

Merged
merged 4 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when do we need secret mount?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To load Google credentials for bigquery

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to find a solution before merging this change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope, just running as root is good, <i just left the comment to be sure the next person is not trying to put an user back

# 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.

Loading