$ ssh <mydomain.com>
$ dokku apps:create <app_name>
$ logout
- Add a new git remote called 'dokku' to your phoenix project
$ git remote add dokku dokku@<mydomain.com>:<app_name>
- Add your ssh key to the dokku user to allow you to push
cat ~/.ssh/id_rsa.pub | ssh root@<mydomain.com> "sudo sshcommand acl-add dokku ssh-key-for-dokku-push"
$ echo "https://github.com/HashNuke/heroku-buildpack-elixir.git" >> .buildpacks
$ echo "https://github.com/gjaldon/heroku-buildpack-phoenix-static.git" >> .buildpacks
$ cat .buildpacks
https://github.com/HashNuke/heroku-buildpack-elixir.git
https://github.com/gjaldon/heroku-buildpack-phoenix-static.git
$ ssh <mydomain.com>
$ dokku config:set <app_name> HOSTNAME=<app_name>.<mydomain.com>
$ dokku config:set <app_name> LC_ALL=en_US.utf8
$ dokku config:set <app_name> SECRET_KEY_BASE=<random 64 character string>
$ logout
Create a file called elixir_buildpack.config
in the root of your project with the following content:
# Erlang version
erlang_version=18.2.1
# Elixir version
elixir_version=1.3.1
# Always rebuild from scratch on every deploy?
always_rebuild=true
# Export heroku config vars
config_vars_to_export=(DATABASE_URL)
$ git push dokku master
$ ssh <mydomain.com>
$ sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git postgres
$ dokku postgres:create <db_name - a.k.a app_name>
$ dokku postgres:link <db_name> <app_name>
$ dokku run <app_name> mix ecto.migrate
$ logout
$ ssh <mydomain.com>
$ dokku domains:add <app_name> <custom_domain>
$ logout
$ ssh <mydomain.com>
$ sudo dokku plugin:install https://github.com/dokku/dokku-letsencrypt.git
$ dokku config:set --no-restart <app_name> DOKKU_LETSENCRYPT_EMAIL=<e-mail>
$ dokku letsencrypt <app_name>
$ dokku letsencrypt:auto-renew river_place
$ logout
Done!
http://<app_name>.<mydomain.com>
or http://<custom_domain>