Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
builtin/nomad-jobspec: document how the URL service can work
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellh committed Apr 19, 2021
1 parent cc58f41 commit 7c80d10
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions builtin/nomad/jobspec/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,17 @@ environment variables using the [templating feature](/docs/waypoint-hcl/function
One of the examples below shows the entrypoint environment variables being
injected.
### URL Service
If you want your workload to be accessible by the
[Waypoint URL service](/docs/url), you must set the PORT environment variable
within your job and be using the Waypoint entrypoint (documented in the
previous section).
The PORT environment variable should be the port that your web service
is listening on that the URL service will connect to. See one of the examples
below for more details.
`)

doc.Example(`
Expand Down Expand Up @@ -252,6 +263,10 @@ job "web" {
%{ for k,v in entrypoint.env ~}
${k} = "${v}"
%{ endfor ~}
// Ensure we set PORT for the URL service. This is only necessary
// if we want the URL service to function.
PORT = 3000
}
}
}
Expand Down

0 comments on commit 7c80d10

Please sign in to comment.