So, I have an application deployed to heroku. In heroku i have a Procfile with the following content:
web: env CONF_listener__port=$PORT bash "./startServer.sh"
When the above command is executed then the shell scripts launches fine. This shell script opens a jar file and the jar file creates a config.txt file. This config.txt file contains username and password that is needed to run some part of the application. Also, The jar is basically a server which won't close until the app is restarted.
The problem i am having is the config.txt file created above is placed on a different dyno. This is because above bash ".startServer.sh" command will spawn a new dyno.
Now, I cannot access it. So, I was wondering if there is any way through which i could grab that config.txt file or may be tell heroku not to spawn a new dyno when bash command is used.
How does the above bash command spawn a new dyno when the dyno count for my app is only 1.