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

Change default ports when Thruster is present #100

Closed
luizkowalski opened this issue May 13, 2024 · 1 comment · Fixed by #101
Closed

Change default ports when Thruster is present #100

luizkowalski opened this issue May 13, 2024 · 1 comment · Fixed by #101

Comments

@luizkowalski
Copy link
Collaborator

Over the weekend, I realized that the exposed port dockerfile-rails generated when Thruster is present is insufficient to make Thurster work transparently. I summed up my findings here but long story short:

  • Thruster's default port is 80
  • Thruster's default Puma port is 3000
  • dockerfile-rails exposes 3000
  • Services like Traefik, which checks for EXPOSE directives to route traffic to the correct port, will bypass Thruster completely in these cases

I think the easiest solution is to keep exposing 3000 for the sake of backward compatibility (and everyone expects Rails to expose 3000 anyway) but bind Thruster to 3000 and Puma to e.g. 3001, something like this:

if thurster?
 ARG TARGET_PORT=3001
 ARG HTTP_PORT=3000
 
 EXPOSE ${HTTP_PORT}
end

I can take a stab at a PR for it unless you have a better idea

@luizkowalski
Copy link
Collaborator Author

hmm, Rails will expose 80 apparently, so that's probably easier...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant