Skip to content

Commit

Permalink
fix(runner): set render PORT
Browse files Browse the repository at this point in the history
https://render.com/docs/web-services#port-binding
Render default port for new service is 10000 and at startup they detect
any app running on another port and switch the primary port to it.
However the switch triggers a restart to reconfigure the network
which is problematic for us since the runner has already registered as
RUNNING and is being potentially sent task
This commit set the PORT explicitely in order to avoid the automatic
detection and restart
  • Loading branch information
TBonnin committed Dec 12, 2024
1 parent 575fc05 commit c094be7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/jobs/lib/runner/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export const renderNodeProvider: NodeProvider = {
plan: getPlan(node)
},
envVars: [
{ key: 'PORT', value: '80' },
{ key: 'NODE_ENV', value: envs.NODE_ENV },
{ key: 'NANGO_CLOUD', value: String(envs.NANGO_CLOUD) },
{ key: 'NODE_OPTIONS', value: `--max-old-space-size=${Math.floor((node.memoryMb / 4) * 3)}` },
Expand Down

0 comments on commit c094be7

Please sign in to comment.