Skip to content

ssimeonoff/terraforming-mars

 
 

Repository files navigation

terraforming-mars

Terraforming Mars Boardgame

Hopefully will eventually use this repository for playing terraforming mars online. The board game is great, this repository highly recommends purchasing it for personal use. If you want to play with people online, you can use this tool.

Demo

You can try online here. Please post any issues found.

Running

You can run the game server locally if you have npm and node. To start the game server run the start script.

npm install
npm run start

This will start the game server listening on the default port of 8080. If you then point a web browser to http://localhost:8080 you will be on the create game screen.

Pointing your web browser to http://localhost:8080/games-overview?serverId=_SERVER-ID_ will provide a list of all games available on the server. The secret SERVER-ID is available from the console after starting the server and required to access game administration pages like the games overview.

docker

Build the docker image and run it

docker build . -t terraforming-mars
docker run -p 8080:8080 terraforming-mars

This will start the game server listening on the default port of 8080. If you then point a web browser to http://localhost:8080 you will be on the create game screen.

docker-compose

If traefik and watchtower are running on your docker host, you can use the docker-compose.yml template of this repo.

It is starting the game from a public image hosted on hub.docker.com

terraforming-mars:
  image: lotooo/terraforming-mars
  container_name: terraforming-mars
  labels:
    - "traefik.frontend.rule=Host:terraforming-mars.mydomain.com"
    - "traefik.port=8080"
    - "traefik.protocol=http"
    - "traefik.backend=terraforming-mars"
    - "com.centurylinklabs.watchtower.enable=true"

Start the service

docker-compose up

This will start the game server. If you then point a web browser to https://terraforming-mars.mydomain.com you will be on the create game screen.

docker-compose + systemd

Copy your docker-compose file in a /data/docker/terraforming-mars folder, then create a systemd unit to stop/start/restart your service

Create a file /lib/systemd/system/terraforming-mars.service with this content:

[Unit]
Description=Terraforming Mars service with docker compose
Requires=docker.service
After=docker.service

[Service]
Restart=always
WorkingDirectory=/data/docker/terraforming-mars

# Remove old containers, images and volumes
ExecStartPre=/usr/bin/docker-compose down -v
ExecStartPre=/usr/bin/docker-compose rm -fv
ExecStartPre=-/bin/bash -c 'docker ps -aqf "name=terraforming-mars*" | xargs -r docker rm'

# Compose up
ExecStart=/usr/bin/docker-compose up

# Compose down, remove containers and volumes
ExecStop=/usr/bin/docker-compose down -v

[Install]
WantedBy=multi-user.target

Reload systemd + enable and start terraforming mars

sudo systemctl daemon-reload
sudo systemctl enable terraforming-mars.service
sudo systemctl start terraforming-mars.service

Contributors ✨

Thanks goes to these wonderful people:


Brian Folts
All the things

Vincent Moreau
Venus, Prelude, Hellas & Elysium, Colonies

alrusdi
Front End

Simeon Simeonov
Cards and Colonies design

Pierre HILBERT
Helps with the things

About

Terraforming Mars Boardgame

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 94.9%
  • CSS 5.0%
  • Other 0.1%