Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

fix: broken trigger.dev templates #4724

Open
wants to merge 6 commits into
base: next
Choose a base branch
from
Open

Conversation

Winne4r
Copy link

@Winne4r Winne4r commented Jan 2, 2025

Changes

  • Fixed the incorrect length for MAGIC_LINK_SECRET, ENCRYPTION_KEY, and SESSION_SECRET in both Trigger.dev templates.

The latest template was unusable due to the following issues:

  • service was working, but it was imposible to login via the cli and deploy anything
  • key creating from UI was also broken

I discovered that the issue was related to wrong length of keys:
https://github.com/triggerdotdev/docker/blob/b2c2949ac923b91f86fe2014059e531fae1d9c33/.env.example#L64

As you can see these secrets should be generated with:

openssl rand -hex 16

which is equal to 32 chars string

@Winne4r Winne4r changed the title FIX: trigger.dev templates - wrong key length issue [WIP] FIX: trigger.dev templates - wrong key length issue Jan 3, 2025
@Winne4r Winne4r changed the title [WIP] FIX: trigger.dev templates - wrong key length issue FIX: trigger.dev templates - wrong key length issue Jan 3, 2025
@Winne4r
Copy link
Author

Winne4r commented Jan 3, 2025

I also added some missing config, with this changes I finally managed to successfully run the background task.

@Winne4r Winne4r changed the title FIX: trigger.dev templates - wrong key length issue FIX: broken trigger.dev templates Jan 3, 2025
@peaklabs-dev peaklabs-dev added the ⚙️ Service Issues requesting or PRs adding/fixing service templates. label Jan 6, 2025
@@ -43,7 +43,7 @@ x-common-env: &common-env
LOGIN_ORIGIN: $SERVICE_FQDN_TRIGGER_3000
APP_ORIGIN: $SERVICE_FQDN_TRIGGER_3000
DEV_OTEL_EXPORTER_OTLP_ENDPOINT: $SERVICE_FQDN_TRIGGER_3000/otel
OTEL_EXPORTER_OTLP_ENDPOINT: "http://trigger:3040/otel"
Copy link
Member

Choose a reason for hiding this comment

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

Why did you change this?

Copy link
Author

@Winne4r Winne4r Jan 14, 2025

Choose a reason for hiding this comment

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

Without this change it will not work properly.
You can check config - 3040 is unused port. Probably earlier smbody changed DEV_OTEL_EXPORTER_OTLP_ENDPOINT to the right one, but forgot about OTEL_EXPORTER_OTLP_ENDPOINT

coordinator:
image: ghcr.io/triggerdotdev/coordinator:v3
platform: linux/amd64
volumes:
- /var/run/docker.sock:/var/run/docker.sock
user: root
ports:
Copy link
Member

Choose a reason for hiding this comment

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

Do not add port mappings as this is insecure.

Copy link
Author

Choose a reason for hiding this comment

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

It's specific to tigger.dev.
The coordinator pulls and runs images in the root Docker network, and this behavior cannot be changed. To enable newly deployed containers to communicate with the coordinator within the trigger network, you can only map the port.

I can change it to bind only 127.0.0.1 to smthing like:

ports:
      - 127.0.0.1:9020:9020

will it help?

Copy link
Author

Choose a reason for hiding this comment

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

I changed it to restrict the port to only the host machine.

@peaklabs-dev peaklabs-dev added 💤 Waiting for changes PRs awaiting changes from the author. and removed 💤 Waiting for changes PRs awaiting changes from the author. labels Jan 14, 2025
@peaklabs-dev peaklabs-dev changed the title FIX: broken trigger.dev templates fix: broken trigger.dev templates Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⚙️ Service Issues requesting or PRs adding/fixing service templates.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants