This web service provides a means to connect DNSimple domains with Heroku applications.
gateways
- This directory holds modules that deal with external APIs
services
- Functions that implement business logic
To start the Heroku Connector app:
- Install dependencies with
mix deps.get
- Create and migrate your database with
mix ecto.create && mix ecto.migrate
- Install Node.js dependencies with
npm install
- Start Phoenix endpoint with
mix phoenix.server
Now you can visit localhost:4000
from your browser.
- Create the Heroku application
- In the top-level repo directory run:
heroku git:remote -a appname
where appname is the Heroku app nameheroku buildpacks:set https://github.com/HashNuke/heroku-buildpack-elixir.git
heroku buildpacks:add https://github.com/gjaldon/heroku-buildpack-phoenix-static.git
heroku addons:create heroku-postgresql:hobby-dev
- Next, set up environment variables
heroku config:set APP_HOSTNAME=appname.herokuapp.com
where appname is the Heroku app nameheroku config:set POOL_SIZE=18
adjust if you use a different postgres tiermix phoenix.gen.secret
and use the result inheroku config:set SECRET_KEY_BASE="generated-secret"
- Add application to DNSimple
heroku config:set DNSIMPLE_CLIENT_ID=id
heroku config:set DNSIMPLE_CLIENT_SECRET=secret
- Add application to Heroku
heroku config:set HEROKU_CLIENT_ID=id
heroku config:set HEROKU_CLIENT_SECRET=secret
git push heroku master
heroku run "POOL_SIZE=2 mix ecto.migrate"