-
Notifications
You must be signed in to change notification settings - Fork 328
Heroku Setup
Robert Konigsberg edited this page Feb 14, 2023
·
14 revisions
NOTE As of 2022-11-28, Heroku no longer has a free tier. However, it is still our recommended way to deploy, as those are our clearest instructions.
- 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 remote add heroku https://git.heroku.com/[app name].git
-
git push heroku main
. If you want to push from another branch, for example,dev
, usedev:main
ref
-
cd
to the root directory of theterraforming-mars
repo. git pull origin main
-
git push heroku main
(ordev:main
)
Edit the dot env file to customize your server such as how many days to keep unfinished games before deleting them.
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.
The game
Fan Expansions
Development
- Databases
- Development tips
- Docker Setup
- dot env
- Heroku Setup
- Local Setup
- Changing-game-data-for-local-testing
- Adding New Cards
- Working with VSCode
- Postgres Notes
- Translations
Other