Commit c8a0990f authored by Tomáš Hübelbauer's avatar Tomáš Hübelbauer

Document how to create a new non-default app with a DB and HTTPS

parent b71d71ee
# Dokku
- [ ] See if .NET Core can be hosted on Dokku
- [ ] See if removing Bloggo and redoing it as a non-default app, then changing it to default app will enable it to work with Let's Encrypt
- [x] Figure out how to deploy a database powered application to a Dokku subdomain without disrupting the default application
- [x] Follow [the docs](http://dokku.viewdocs.io/dokku/deployment/application-deployment/):
- [x] Create a [new application](https://gitlab.com/TomasHubelbauer/agenda/commit/f5900ae93f212ed077c35de88cb059495fd98ecd) (in this case a Node application)
- [x] Shell to the host and run `dokku apps:create agenda`
- [x] `sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git` to install Postgres
- [x] Verify the default app still works
- [x] `dokku postgres:create agenda-db` and note down the details
- [x] `dokku postgres:link agenda-db agenda` and note the env var name and value
- [x] Go back to local and `cd` into the application directory: `cd agenda`
- [x] `git remote add dokku dokku@hubelbauer.net:agenda` to add a Dokku remote for the app (can check the remote in the default app)
- [x] `wsl` to switch to Windows Subsystem for Linux because that's where the key is from when the default app was created
- [x] `git push dokku master`
- [x] Check the app runs at [`http://agenda.hubelbauer.net`](http://agenda.hubelbauer.net)
- [x] Ensure the default app at [`http://hubelbauer.net`](http://hubelbauer.net) still works
- [x] `dokku config:set --no-restart agenda DOKKU_LETSENCRYPT_EMAIL=tomas@hubelbauer.net`
- [x] `dokku letsencrypt agenda`
- [x] Check the app runs at [`http://agenda.hubelbauer.net`](http://agenda.hubelbauer.net) redirects to HTTPS
- [x] Ensure the app runs at [`https://agenda.hubelbauer.net`](https://agenda.hubelbauer.net)
- [x] Ensure the default app at [`http://hubelbauer.net`](http://hubelbauer.net) still works
- [x] Update the app to connect to Postgres
- [commit](https://gitlab.com/TomasHubelbauer/agenda/commit/8ad9efbd5c90847c755648e0c2fa14639ab3962e)
- [errata](https://gitlab.com/TomasHubelbauer/agenda/commit/828ca069fa35fa9d9f43dfd3099d28fe1711aa6c)
- [docs](https://node-postgres.com/features/connecting) (the environment variables is from the above)
- [x] `wsl`
- [x] `git push dokku master`
- [x] Ensure the app runs at [`https://agenda.hubelbauer.net`](https://agenda.hubelbauer.net) and shows *Hello World* form the Postgres query
- [x] Ensure the default app at [`http://hubelbauer.net`](http://hubelbauer.net) still works
- [x] Rejoyce
Dokku is a self-hosted alternative to Heroku that allows one to just `git push dokku master` like with Heroku and have apps up in seconds.
It uses [herokuish](https://github.com/gliderlabs/herokuish) to simulate the Heroku build and deployment.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment