This is a Cloud Native Buildpack for ngrok. It can be used to creare secure tunnels into your container that are available on the public internet.
Combine the ngrok buildpack with other buildpacks to have it install and run ngrok alongside your app:
$ pack build -b jkutner/ngrok,heroku/nodejs myapp
Run the container with an NGROK_TOKEN
environment variable:
$ docker run -e NGROK_TOKEN=xxx -it mypp
The buildpack will load .ngrok2/ngrok.yml
file from your app if it is present. For more information, see the ngrok documentation on configuration files.
You can also set the NGROK_OPTIONS
environment variable at runtime to apply custom options to the ngrok command.
WARNING: Do not put your ngrok token in this file unless you are loading it from a Kubernetes secret in a volume mount or similar.
You can you use the ngrok buildpack with the sshd buildpack to expose an SSH server to the internet. Put the following in your .ngrok2/ngrok.yml
tunnels:
ssh:
proto: tcp
addr: 2222
Then build your app
$ pack build -b jkutner/sshd,jkutner/ngrok,heroku/nodejs myapp
Run the resulting image and you'll be able to SSH into your container using the ngrok URL.