forked from terraforming-mars/terraforming-mars
-
Notifications
You must be signed in to change notification settings - Fork 0
Heroku Setup
Robert Konigsberg edited this page Sep 25, 2020
·
5 revisions
- Install git on Terminal
- Sign up for a free Heroku account
- Install Heroku CLI on your Terminal
-
cd
to the location where you want to put the TM web app folder git clone https://github.com/bafolts/terraforming-mars.git
cd terraforming-mars
heroku login
- Enter your Heroku credentials
-
heroku create [app name]
([app name] is whatever you want to call your server. The server will eventually be[app name].herokuapp.com
, and the git repo will behttps://git.heroku.com/[app name].git
.) git push heroku master
(If you want to push from another branch, use branch:master
ref)
-
cd
to the inside of terraforming-mars folder git pull
git push heroku master
By default Heroku's apps use the http protocol, and that's probably not good if you plan to share the link. Follow the instructions at on README.md to set up https.
The free Heroku server falls asleep after 20-30 minutes of inactivity. You can set up a database to contain seeds from previously played games. Without setting this up, the seeds will be wiped after Heroku server goes to sleep. This instruction is from 13and3.
- Go to your Heroku dashboard
- Click on your TM server app
- Configure Add-ons
- In the add-ons search box, type "Heroku Postgres" and select it. Plan name: [Hobby Dev - Free]. Provision to add it to the server.
- Go to Settings
- Reveal Config Vars
- Copy the text
postgres://...
from the text field next to DATABASE_URL to the one below next to POSTGRES_HOST.