In Ngrok docker, using compose, there's a constant error saying:
ngrok.yml
verion: "3"
authtoken: "<your-auth-token-1>"
tunnels:
webapp:
proto: http
hostname: usable-honeybee-workable.ngrok-free.app
addr: webapp-1:8080
inspect: false
host_header: rewrite
bind_tls: true
labels:
- env=dev
- team=infra
docker-compose.yaml
version: '3.1'
services:
webapp:
image: mywebapp
restart: always
ports:
- 8080:8080
ngrok:
image: ngrok/ngrok:alpine
restart: unless-stopped
environment:
NGROK_AUTHTOKEN: <your-auth-token-1>
command:
- "start"
- "--all"
- "--config"
- "/etc/ngrok.yml"
volumes:
- ./ngrok/ngrok.yml:/etc/ngrok.yml
ports:
- 4040:4040
Starting the containers
docker-compose -f docker-compose.yaml up -d
docker ps show the ngrok container being restarted continuously:
2b2e2922b797 ngrok/ngrok:alpine "/nix/store/m068srsx…" 12 minutes ago Restarting (1) 4 seconds ago
Upon checking logs using:
docker logs <container-id> --follow | more
I see:
ERROR: Error reading configuration file '/etc/ngrok.yml': `version` property is required.
ERROR:
ERROR: If you're upgrading from an older version of ngrok, you can run:
ERROR:
ERROR: ngrok config upgrade
ERROR:
ERROR: to upgrade to the new format and add the version number.
Has anyone come across this issue? I added the version tag into the ngrok.yaml as you can see, tried with "2" and "3" with no luck.
Any help much appreciated!
PM from ngrok here. The short answer here is that the version in your config should be 2.
The long answer is that the version of the ngrok binary and the version of the syntax of the config file can and have been rev'd independently. We wanted to leave the option open to make breaking changes to the syntax of the config file without needing to make breaking changes to the agent.