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

Environment variables needed #23

Open
sylvain-combe-sonarsource opened this issue Jun 28, 2022 · 3 comments
Open

Environment variables needed #23

sylvain-combe-sonarsource opened this issue Jun 28, 2022 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@sylvain-combe-sonarsource
Copy link

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!

@russorat
Copy link

russorat commented Jun 28, 2022

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

@russorat russorat added enhancement New feature or request help wanted Extra attention is needed labels Jun 28, 2022
@MrAdam
Copy link

MrAdam commented Feb 27, 2023

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

@bkuhl
Copy link

bkuhl commented Jan 16, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants