You'll need to run this script on a machine that has the Heroku CLI (and has logged into it), has Git installed, has curl and wget installed and has tar.
sh heroku-fathom-lite.sh cool-fathom [email protected] P@$$w0rD
You'll need to run this script on a machine that has the Heroku CLI (and has logged into it), has Git installed, has curl and wget installed and has tar.
sh heroku-fathom-lite.sh cool-fathom [email protected] P@$$w0rD
| # Installs Fathom Lite on Heroku | |
| APPNAME=$1 | |
| EMAIL=$2 | |
| PASS=$3 | |
| heroku create $APPNAME --buildpack https://github.com/ph3nx/heroku-binary-buildpack.git | |
| heroku git:clone -a $APPNAME | |
| cd $APPNAME | |
| mkdir -p bin | |
| curl -s https://api.github.com/repos/usefathom/fathom/releases/latest \ | |
| | grep browser_download_url \ | |
| | grep linux_amd64.tar.gz \ | |
| | cut -d '"' -f 4 \ | |
| | wget -qi - -O- \ | |
| | tar --directory bin -xz - fathom | |
| echo "web: bin/fathom server" > Procfile | |
| heroku addons:create heroku-postgresql:hobby-dev | |
| heroku config:set PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/app/bin \ | |
| FATHOM_DATABASE_DRIVER=postgres \ | |
| FATHOM_DATABASE_URL=$(heroku config:get DATABASE_URL) \ | |
| FATHOM_DEBUG=true \ | |
| FATHOM_SECRET=$(openssl rand -base64 32) \ | |
| FATHOM_GZIP=true | |
| git add . | |
| git commit -m "Install Fathom Lite" | |
| git push heroku master | |
| heroku dyno:resize hobby | |
| heroku run fathom --version | |
| heroku run fathom user add --email=$EMAIL --password=$PASS | |
| heroku open |