Edit files on Heroku

#1

How do I edit the json files when the bot is hosted as Docker at Heroku?

1 Like
#2

You need to go to the Heroku console and run the bash command. This way you enter the docker container where the bot is running.

Heroku / more (button) / Run console

But changed files will be rewritten with the default ones when the bot restarts, or some changes will not even apply.

#3

But if I enter the connection data to Facebook like appSecret and verifyToken into the file channel-messenger.json then it must be permanent. How do I do it?

#4

I have no experience with deploying to messenger, but if you want to enter the Heroku container you do it in Heroku console with bash.

If you want to edit files inside the container then you must install nano and other packages to the Docker container, meaning that you must extend the Botpress docker image. But there must certainly be another way to accomplish what you are trying to do.

I’m just guessing that you are trying to add the appSecret and Token to the bot, isn’t there a config file that should have the information before you deploy?

Maybe someone else could help you with this matter…

#5

@Hariko50

When you want to change files permanently, then you need to rebuild, re-upload and re-release your docker container… Please check the Heroku Docs on how to do that.

/Crixx