I accidentally ran into the issue that my app crashed 10 times over so it was suspended. I’m not really sure why it happened but I think it’s just some startup bug with my app since I could see it starting and all but crashed on some mongo connection error.
Then I went ahead and (possibly) fixed the error in my code and then restarted the app using fly m restart ...
. The problem is that the config was lost when I did this. I started the app with the configuration like so:
fly m run . --dockerfile ./backend.dockerfile --region ams -p 443:8080/tcp:tls:http -p 80:8080/tcp:http -a floral-butterfly-3827
First, is it possible to have this configuration(region and ports) in a file somewhere or possible editable in the website or something? I would also like if possible a restart/start/stop button on the website when I enter a machine.
Secondly, do I really have to type in all this whenever I want to restart my machine? I would like something like the fly.toml for machines too. It’s not something that’s often going to change and I can’t keep this information in my head.
EDIT: I found I could pass a -c arg pointing to a config file location. I’m not used to discover things in CLI -h commands , but I still would like to see a friendlier way to manage configs and starting/stopping.
EDIT 2: It seems the only way for me to get out of this state is to delete the machine and then do fly run
.