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.
You can try online here. Please post any issues found.
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.
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.
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.
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
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 |