Coder Social home page Coder Social logo

morisanhf / terraforming-mars Goto Github PK

View Code? Open in Web Editor NEW

This project forked from terraforming-mars/terraforming-mars

0.0 0.0 0.0 8.99 MB

Terraforming Mars Boardgame

License: GNU General Public License v3.0

TypeScript 94.90% CSS 4.95% HTML 0.05% JavaScript 0.09% Dockerfile 0.01%

terraforming-mars's Introduction

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

terraforming-mars's People

Contributors

vincentneko avatar alrusdi avatar bafolts avatar pierrehilbert avatar gomfunkel avatar freelikegnu avatar rzulian avatar ssimeonoff avatar morisanhf avatar bradwerth avatar lotooo avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.