tilt icon indicating copy to clipboard operation
tilt copied to clipboard

Specify Tilt web-ui port in Tiltfile

Open ivangreene opened this issue 5 months ago • 2 comments

Describe the Feature You Want

Be able to specify the Tilt web-ui port inside a Tiltfile (default being 10350)

Current Behavior

Not finding a way to do this. Trying to run tilt up in multiple projects does not work due to conflicting port allocation

Why Do You Want This?

  • Make it easier to run multiple Tiltfiles at once without port conflicts

People running apps in our org are instructed to simply run tilt up to get started. Running multiple requires specifying the port either as a command line argument, or as an environment variable. Neither of these make the user experience smooth, unless we wrap the execution with another script that does this

Additional context Related issue: #3434

ivangreene avatar Jul 16 '25 18:07 ivangreene

A consistent port per-app is also better in my opinion than a random port, because it will still prevent duplicates of the same app from running at the same time. E.g monkey-service Tiltfile runs on port 10358, banana-service Tiltfile runs on port 10357. They can both run at once, but you can't start an additional instance of either one accidentally because the port for that service is already allocated

ivangreene avatar Jul 16 '25 18:07 ivangreene

Not sure this is a good idea. You'll introduce a circular dependency between the tilt server and the tiltfiles on startup. E.g. if the tiltfiles files to load for some reason, how will you connect to the tilt server to debug it?

Have you considered a makefile? That would be way simpler and has fewer weird error cases.

nicks avatar Jul 17 '25 02:07 nicks