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

Unable to set httpPort and tlsPort without a config file #407

Open
mitar opened this issue May 8, 2023 · 2 comments
Open

Unable to set httpPort and tlsPort without a config file #407

mitar opened this issue May 8, 2023 · 2 comments

Comments

@mitar
Copy link

mitar commented May 8, 2023

I think it would be nice if more options could be set through command line arguments or through environment variables. In my case, I would like to set httpPort and tlsPort to regular values: with Docker image it is easy to do have them on regular ports. But doing that seems to be hard when running Pebble on GitLab CI as Docker runs as a separate Docker-in-Docker container, so it is hard to get a config file in there to bind mount it into the container to set a config file. The only way I found is that I do another Pebble image, extending official one, with my own config file and then use that one. A lot of work just to change two settings.

I have had great experience with Kong for CLI and config parsing in Go.

@jsha
Copy link
Contributor

jsha commented May 9, 2023

Thanks for posting about this. Can you tell us more about why you need to override the httpPort and tlsPort values? I would have thought that running on Docker would make it particularly unneeded to change those, since each container gets its own IP address.

@mitar
Copy link
Author

mitar commented May 9, 2023

I am using Pebble to test in CI my tozd/nginx-proxy Docker image which extends nginx with support for Let's encrypt (so nginx Docker image acting as a reverse proxy can obtain TLS certificates automatically). That nginx listens on ports 80 and 443. So when testing the Let's encrypt integration with Pebble, the Pebble container connects to nginx container directly so it has to connect to 80 and 443 ports. It does not connect to the host (where I could bind those ports to some higher/other ports).

So you are right, because Docker containers get their own IP address and can bind to privileged ports, there is little reason for them not to simply use standard HTTP ports.

Things work for me now, but I have do build an additional Pebble Docker image with changed default config (just ports).

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

No branches or pull requests

2 participants