Forked repo with some modifications to the docker file https://github.com/CoMakery/loomio
Roughly followed instructions here https://github.com/loomio/loomio-deploy
git clone https://github.com/CoMakery/loomio
cd loomio
I did this on the fork of loomio here
build:
docker:
web: Dockerfile
run:
web: ./docker_start.sh
git add heroku.yml
git commit -m 'add heroku.yml'
heroku git:remote -a the-app-name
heroku stack:set container
git push heroku master
Had trouble authenticating to the container so, just went to the heroku web, selected console and ran:
rake db:schema:load
Got to the bash shell on the docker container by running:
heroku login
heroku run bash
Attach a free versions of Heroku extensions for:
- Heroku Redis
- MailGun SMTP Mail Server
- Postgres Server
https://github.com/CoMakery/loomio/blob/master/config/application.rb#L104
Had to switch to Heroku Hobby tier of $7/mo to get free SSL cert. Other SSL addons were > $20/mo. Configuring and maintaing lets encrypt or buying an SSL cert is too much admin
- Setup MailGun SMTP env variables
- confirm ssl forwarding is working
- create admin user
- add more sys admins
You can't run rake db:setup because you can't create a new postgres db from the container
It was tricky to get to the heroku container because bin/bash was not installed in the image see: https://stackoverflow.com/questions/46652928/shell-into-a-docker-container-running-on-a-heroku-dyno-how/49489678
Supposedly I coul have added this to the Dockerfile to make heroku ps:exec work but running it from Heroku web didn't fix it:
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
That said you can get to the bash shell on the docker container by running:
heroku login
heroku run bash