3 ms·
My major gripe with dokku is that there is no way to define the configuration in a file rather than executing the commands manually. Otherwise: totally agree,
by oezi 2y ago
My major gripe with dokku is that there is no way to define the configuration in a file rather than executing the commands manually.
Otherwise: totally agree, great tool for self hosting.
- JonAtkinson 2y agoYou can configure almost everything using an app.json file. https://dokku.com/docs/deployment/deployment-tasks/ https://dokku.com/docs/deployment/deployment-tasks/
- dewey 2y agoI believe they are talking about the Dokku commands that are needed to set up a new Dokku app. For example for a static site that would be the following: dokku apps:create dewey.at dokku domains:set dewey.at dewey.at www.dewey.at dokku letsencrypt:enable dewey.at That's also one of my wishes to get improved, currently I just have a long text file where I store them so that if I move servers I can just re-run them if needed.
- mdasen 2y agoCould you put them in a .sh file and then just run `sh setup_dewey.sh`? Maybe put `&&` between them so that if one fails, it won't keep running through the script?
- dewey 2y agoYep, in theory I think that should work nicely. So the recovery procedure after a server died would be to restore the dokku data directory from backup and then re-run all the commands. I haven't tested that but I think that should do the job. Right now I keep the list of commands more as a reference to look up things like how I mounted a volume or my naming scheme for data directories.
- chuckadams 2y ago> Maybe put `&&` between them so that if one fails, it won't keep running through the script? Or just add `set -o errexit` at the top of the script. Or use make.
- oezi 2y agoExactely, I was really surprised that dokku isn't all based on storing these commands in a config/script which gets executed every time you change something.
- imemyself 2y agoIt doesn't cover everything - but I've had great success with terraform and this module. https://github.com/aaronstillwell/terraform-provider-dokku https://github.com/aaronstillwell/terraform-provider-dokku
- josegonzalez 2y agoWe have ansible modules (https://github.com/dokku/ansible-dokku https://github.com/dokku/ansible-dokku) that cover the majority of app management if thats what you want. The reason I am hesitant to do it in something like `app.json` is purely because one might expose Dokku to users who only have push access and some of those commands can be fairly destructive. Disclaimer: I am the Dokku maintainer.
- oezi 2y agoThank you! I was hoping for something less intimidating than going full ansible/terraform. Essentially something that captures all dokku invocations and could be transferred to another machine. Is app.json this?
- 0xblinq 2y agoI’d love this feature too. Why not add it as an optional thing to enable and let users decide? Maybe just put a big warning in the docs and make it opt-in?
- josegonzalez 2y agoI really hate adding knobs - it increases the amount of work I need to do to maintain and support the project. Long term, I'd like to port the ansible modules over to being maintained internally by the dokku/omakase project, and then maybe that could be a plugin that folks could run from within their deploy.