Some database fun around countries.
Docker and Docker Compose
$ docker-compose build
$ docker-compose up -d
Run docker-compose up without the -d flag to see build steps:
$ docker-compose up
$ docker-compose exec countries bash
$ mix phx.server
Visit http://localhost:4000
Create a new app on Heroku
- under addons, add a postgres DB
- under settings, add the following buildpacks (make sure they are in this order)
- under settings, add a SECRET_KEY_BASE to Config vars
Add heroku as a git remote
$ heroku git:remote -a <heroku_app_name>
Deploying
$ git push heroku --app countries master
You can run migrations and other mix tasks like this:
$ heroku run "POOL_SIZE=2 mix ecto.migrate --app countries"