self-hosted unable to deploy to production ghcr 403 #3645
-
|
Hi I'm a new trigger.dev user. Thanks for the project! I have been working with trigger.dev in development env and now I am ready to deploy to production. I run this command Unfortunately, I see an error. bunx trigger.dev@latest deploy --api-url https://trigger.sbtp.xyz
(node:500706) Warning: `--localstorage-file` was provided without a valid path
(Use `node --trace-warnings ...` to show where the warning was created)
Trigger.dev (4.4.6)
------------------------------------------------------
┌ Deploying project
│
◇ Retrieved your account details for chris@grimtech.net
│
◇ Successfully built code
│
◇ Failed to deploy project
│
└ Error: Error building image. Full build logs have been saved to /tmp/trigger-qBS0ff/build-3ihrfcab.log
Last few lines of logs:
------
> exporting to image:
------
ERROR: failed to build: failed to solve: failed to fetch anonymous token: unexpected status from GET request to https://ghcr.io/token?scope=repository%3Atrigger%2Fproj_zlvybyxzqtafjwonlxid%3Apull%2Cpush&service=ghcr.io: 403 Forbidden
It's pushing to ghcr.io? This is confusing me. I thought it would be pushing to my self-hosted instance. The Deployments page of the web ui shows some errors too. and But those are probably surface level errors. I think the most obvious problem is the 403 error on ghcr. I deployed trigger.dev using the outdated Coolify app, and then manually upgraded it to v4.4.6, so maybe something in that process got broken? I'm not sure what to do about it, but I'll keep digging. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
I think I figured out the issue. I was thrown off by the following mention in the docs.
I think this isn't true for self-hosting. For self-hosting in production, you have to configure a docker registry using env vars. https://trigger.dev/docs/self-hosting/docker#registry-setup so I deployed a docker registry (https://distribution.github.io/distribution) on my Coolify. Then I needed to ensure the following env vars were present in my docker-compose.yaml file, under the trigger service. I'm using coolify so these were already in the docker-compose. Then I made sure that I had Then I had to auth. After that, I deployed, and I was seeing activity on the production env in my trigger instance. |
Beta Was this translation helpful? Give feedback.
I think I figured out the issue. I was thrown off by the following mention in the docs.
I think this isn't true for self-hosting. For self-hosting in production, you have to configure a docker registry using env vars.
https://trigger.dev/docs/self-hosting/docker#registry-setup
so I deployed a docker registry (https://distribution.github.io/distribution) on my Coolify.
Then I needed to ensure the following env vars were present in my docker-compose.yaml file, under the trigger service. I'm using coolify so these were already in the docker-compose.