Last active
February 25, 2025 13:24
-
-
Save gmolveau/78f88af3f5951ba6e093f93a07caa302 to your computer and use it in GitHub Desktop.
Revisions
-
gmolveau revised this gist
Mar 10, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -64,7 +64,7 @@ heroku config:set PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/ FATHOM_DATABASE_DRIVER=postgres \ FATHOM_DATABASE_URL=$(heroku config:get DATABASE_URL) \ FATHOM_DEBUG=true \ FATHOM_SECRET=$(openssl rand -base64 32) \ FATHOM_GZIP=true ``` -
Grégoire MOLVEAU revised this gist
Feb 11, 2019 . 1 changed file with 24 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,17 @@ # Deploy Fathom on Heroku ### Requirements * heroku cli (logged in) * git * curl * wget * tar are required * ~ openssl is required to generate the secret_key, but you're free to use what you want ### Create the app First you need to choose a unique app name, as Heroku generates a subdomain for your app. * create the app via the buildpack @@ -16,13 +26,13 @@ heroku git:clone -a UNIQUE_APP_NAME cd UNIQUE_APP_NAME ``` * create the folder that will contain fathom ```bash mkdir -p bin ``` * download latest version of fathom for linux 64bit ```bash curl -s https://api.github.com/repos/usefathom/fathom/releases/latest \ @@ -33,20 +43,22 @@ curl -s https://api.github.com/repos/usefathom/fathom/releases/latest \ | tar --directory bin -xz - fathom ``` * create the Procfile for Heroku ```bash echo "web: bin/fathom server" > Procfile ``` * create a Postgres database (you can change the type of plan if you want - https://elements.heroku.com/addons/heroku-postgresql#pricing) ```bash heroku addons:create heroku-postgresql:hobby-dev ``` * update the environment variables, generate a secret_key here you can change the way you generate your secret_key. ```bash heroku config:set PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/app/bin \ FATHOM_DATABASE_DRIVER=postgres \ @@ -64,15 +76,14 @@ git commit -m "First Commit" git push heroku master ``` * the created app runs as a free-tier. A free-tier dyno uses the account-based pool of free dyno hours. If you have other free dynos running, you will need to upgrade your app to a 'hobby' one. - https://www.heroku.com/pricing ```bash heroku dyno:resize hobby ``` * check that everything is working ```bash heroku run fathom --version @@ -84,10 +95,10 @@ heroku run fathom --version heroku run fathom user add --email="test@test.com" --password="test_password" ``` * open the browser to login and add your first website ```bash heroku open ``` * ENJOY :) -
Grégoire MOLVEAU revised this gist
Feb 11, 2019 . No changes.There are no files selected for viewing
-
Grégoire MOLVEAU renamed this gist
Feb 11, 2019 . 1 changed file with 54 additions and 16 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,55 +1,93 @@ # Fathom on Heroku * heroku cli + git + curl + wget + tar are required * openssl is required to generate the secret_key, but you can change to something else * create the app via the buildpack ```bash heroku create UNIQUE_APP_NAME --buildpack https://github.com/ph3nx/heroku-binary-buildpack.git ``` * locally clone the newly created app ```bash heroku git:clone -a UNIQUE_APP_NAME cd UNIQUE_APP_NAME ``` * create the folder that will contain our binary ```bash mkdir -p bin ``` * download latest version of fathom ```bash 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 ``` * create the Procfile for heroku ```bash echo "web: bin/fathom server" > Procfile ``` * create a Postgres database ```bash heroku addons:create heroku-postgresql:hobby-dev ``` * update the environment variables, generate a secret_key ```bash 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 ``` * add, commit and push all our files ```bash git add --all git commit -m "First Commit" git push heroku master ``` heroku ps:scale web=1 * a free-tier dyno uses the hours pool, if you have other free dynos running, you will need to upgrade to a hobby * - https://www.heroku.com/pricing ```bash heroku dyno:resize hobby ``` * check if everything works ```bash heroku run fathom --version ``` * add the first user ```bash heroku run fathom user add --email="test@test.com" --password="test_password" ``` * open the browser to connect and create your first website ```bash heroku open ``` * ENJOY :) -
Grégoire MOLVEAU revised this gist
Feb 11, 2019 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,5 @@ # heroku cli + git + curl + wget + tar are required # openssl is required to generate the secret_key, but you can change to something else # create the app via the buildpack heroku create UNIQUE_APP_NAME --buildpack https://github.com/ph3nx/heroku-binary-buildpack.git -
Grégoire MOLVEAU revised this gist
Feb 11, 2019 . 1 changed file with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -51,5 +51,7 @@ heroku run fathom --version # add the first user heroku run fathom user add --email="test@test.com" --password="test_password" # open the browser to connect and create your first website heroku open # ENJOY :) -
Grégoire MOLVEAU revised this gist
Feb 11, 2019 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -40,8 +40,9 @@ git add --all git commit -m "First Commit" git push heroku master heroku ps:scale web=1 # a free-tier dyno uses the hours pool, if you have other free dynos running, you will need to upgrade to a hobby # - https://www.heroku.com/pricing heroku dyno:resize hobby # check if everything works -
Grégoire MOLVEAU revised this gist
Feb 11, 2019 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -40,8 +40,9 @@ git add --all git commit -m "First Commit" git push heroku master # choose a "hobby" dyno (because in free tier the dyno goes to sleep) -https://www.heroku.com/pricing heroku ps:scale web=1 heroku dyno:resize hobby # check if everything works heroku run fathom --version -
Grégoire MOLVEAU revised this gist
Feb 11, 2019 . No changes.There are no files selected for viewing
-
Grégoire MOLVEAU revised this gist
Feb 11, 2019 . No changes.There are no files selected for viewing
-
Grégoire MOLVEAU created this gist
Feb 11, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,53 @@ # heroku cli + git + curl + wget + tar are required # openssl is required to generate the secret_key, but you can change to something else # go to a temporary folder cd /tmp # create the app via the buildpack heroku create UNIQUE_APP_NAME --buildpack https://github.com/ph3nx/heroku-binary-buildpack.git # locally clone the newly created app heroku git:clone -a UNIQUE_APP_NAME cd UNIQUE_APP_NAME # create the folder that will contain our binary mkdir -p bin # download latest version of fathom 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 # create the Procfile for heroku echo "web: bin/fathom server" > Procfile # create a Postgres database heroku addons:create heroku-postgresql:hobby-dev # update the environment variables, generate a secret_key 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 # add, commit and push all our files git add --all git commit -m "First Commit" git push heroku master # add a dyno (because in free tier the dyno goes to sleep) -https://www.heroku.com/pricing heroku ps:scale web=1 # check if everything works heroku run fathom --version # add the first user heroku run fathom user add --email="test@test.com" --password="test_password" # open the browser to check if everything is fine heroku open