FreezyExp / terraforming-mars

Terraforming Mars Boardgame

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

terraforming-mars

Terraforming Mars Boardgame

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. If you plan on playing long running games it is recommended to host the game locally. This demo site is currently not stable and gets restarted during each push to master. As this repository is gaining in popularity we attempt to make this demo page stable but it can't be guaranteed that your game will not be lost. Running the game locally will always be straight forward and it is highly recommended to host the game locally and provide the server ip to other players.

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

License:GNU General Public License v3.0


Languages

Language:TypeScript 94.9%Language:CSS 4.9%Language:JavaScript 0.1%Language:HTML 0.1%Language:Dockerfile 0.0%