Open sylvain-combe-sonarsource opened 2 years ago
Hi @sylvain-combe-sonarsource thanks for the issue. I agree this makes sense. I've opened up an internal issue to track this.
We'd also be very happy to review a PR for something like this. If you want to chat about possible solutions, you can join us in https://ngrok.com/slack
It's still possible to configure it directly from the docker-compose file, by supplying a command
argument, which gets appended to the entrypoint script, and passed onwards to ngrok
services:
ngrok:
image: ngrok/ngrok
environment:
- NGROK_AUTHTOKEN
command: http https://host.docker.internal:8080 --log stdout
A potential alternative implmenetation/configuration approach could be to mirror what traefik does for docker-compose, where labels on services are used to compile the yml file when the app boots up. Here's a config example. This allows many services to have tunnels configured, whereas using env vars directly can be a bit challenging when configuring multiple tunnels.
Hello One should not need to write some distinct YAML to configure a simple docker service.
That's why I like the wernight/ngrok image; it provides all the env variables I needed to configure an ngrok v2 directly from my compose stack config file. As I need to move to ngrok v3, I'd like to get at least the same level of functionality from the official image. The easisest path to do so would be to map each global parameter to an environment variable.
Thanks!