Q: How can I use .qgtunnel for Separate Environments?
Option A) If you are using transparent mode, you can put all your endpoints in the same .qgtunnel file and it will work.
Transparent mode will create DNS records for all records in the .qgtunnel file and then when you go to connect to your endpoint it will match and do the right thing. Those that belong to the other environments will just never be called/matched.
Option B) Add a launch script and then use environment variables to dynamically build the .qgtunnel file.
Example:
#!/bin/bash echo "$QGTUNNEL_CONTENT" > .qgtunnel bin/qgtunnel $@
Then if you set your Procfile to run this script (say bin/qglaunch) instead of bin/qgtunnel, it should be successful.
For example:
web: bin/qglaunch your-application your arguments