-
Notifications
You must be signed in to change notification settings - Fork 465
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
Added the docker options override configuration for traefik #100
Added the docker options override configuration for traefik #100
Conversation
This can also be used to enable port 443 for https. Just a thought, why not rename traefik:
ports:
- 80
- 443
- 9000 |
@kjellberg That's a good point. I think it would fit better with moving away from traefik defaults too. I'll get time later today to edit. |
Actually I need this right now. Was trying to enable https for a website but I had to patch mrsk to add port 443, just 5 seconds before you created this PR. Cloudflare messes up with session cookies, using flexible ssl, so would be nice to support additional ports. If this get merged, I'd be happy to create a patch that enables ssl with as simple as: servers:
web:
hostname: example.com
hosts:
- 206.189.112.50
traefik:
ports:
- 80
- 443
letsencrypt:
email: [email protected] Another thought: What if two different projects deploys to the same server. How do we keep the traefik config consistent? Should Project Atraefik:
ports:
- 80
- 9000
- 9001 Project Btraefik:
ports:
- 80
- 8080 Deploying Project B will override ports config from Project A. I guess we already have the same problem with |
@kjellberg Made suggested change to |
2cac6d0
to
53046ef
Compare
else | ||
["--volume /var/run/docker.sock:/var/run/docker.sock"] | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was looking to have all this be generic. That there's nothing specific about publish or volumes. That it should all just be options that turn into this. Like we do for app.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad - I misunderstood. Updated to do just this.
@dhh I've edited the |
I ran into problems with this feature with the ActiveSupport main-branch. There, |
See #98 for more detailed proposal. This change adds the
additional_ports
configuration for traefik. Includes documentation to give entrypoint examples for this escape hatch. The ruby code impacted is relatively small - we essentially just allow a user to add other published ports to the traefik container.The obvious downside to this is that by using this configuration in isolation a user could bring down their service. Traefik wouldn't know which port to bind as the default entrypoint and would fail to serve traffic.
Added a unit test and tested locally against a running deploy.