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

Allow Traefik to run without publishing port #368

Merged
merged 1 commit into from
Aug 24, 2023
Merged

Allow Traefik to run without publishing port #368

merged 1 commit into from
Aug 24, 2023

Conversation

tsvallender
Copy link
Contributor

Adds the publish option which, if set to false, does not pass --publish to docker run when starting Traefik. This is useful when running Traefik behind a reverse proxy, for example.

Example deploy.yml:

traefik:
  publish: false

If not specified or set to true, the default or specified port will be used as per current behaviour.

Copy link

@Zeko369 Zeko369 left a comment

Choose a reason for hiding this comment

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

Could you add a few lines in the docs about?

1: that this exists now
2: how to use it with an additional traefik/nginx rev proxy (or just a link to a guide) and a usecase (i.e. "if you want to host 2 apps on a same machine use this + a separate traefik/nginx")

@tsvallender
Copy link
Contributor Author

Could you add a few lines in the docs about?

1: that this exists now 2: how to use it with an additional traefik/nginx rev proxy (or just a link to a guide) and a usecase (i.e. "if you want to host 2 apps on a same machine use this + a separate traefik/nginx")

Sure, in this case are the docs the README? Happy to add it to the site repo too but I assumed that would happen after this was merged (or at least approved)?

lib/mrsk/commands/traefik.rb Outdated Show resolved Hide resolved
@dhh
Copy link
Member

dhh commented Aug 23, 2023

Can you rebase? Looks good to me.

@dhh
Copy link
Member

dhh commented Aug 23, 2023

Doc change needs to happen against basecamp/kamal-site repo.

Adds the `publish` option which, if set to false, does not pass `--publish` to
`docker run` when starting Traefik. This is useful when running Traefik
behind a reverse proxy, for example.
tsvallender added a commit to tsvallender/kamal-site that referenced this pull request Aug 24, 2023
@tsvallender
Copy link
Contributor Author

I've rebased and added documentation to the site repo basecamp/kamal-site#17

Copy link

@defsdoor defsdoor left a comment

Choose a reason for hiding this comment

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

Good work and a nice option - we run multiple application containers on different docker networks behind a broader proxy and have no need to bind to the host - this avoids port shuffling.

@dhh dhh merged commit eb3cb81 into basecamp:main Aug 24, 2023
6 checks passed
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 this pull request may close these issues.

4 participants