A small, web-based rock-paper-scissors game that can be played against the computer.
The application runs in a Docker container and can optionally be configured with Traefik as a reverse proxy.
- Web-based: Simple browser interface.
- Traefik integration: Automatic HTTPS support via Let's Encrypt.
- Dockerized: Platform-independent thanks to Docker.
- ARM-compatible: Works on both ARM and x86 architectures.
- Docker (at least version 20.x)
- Docker Compose
- Traefik (as a reverse proxy) | (optional)
- A domain pointing to the server | (optional)
(Optional) Without the above requirements:
Simply start directly using the following command:
node server.js
- Clone the repository
git clone https://github.com/thyrail/rock-paper-scissors.git
cd rock-paper-scissors
- Create a
.env
file Create a .env file in the project directory and add the required variables:
EMAIL=[email protected]
RPS_APP_DOMAIN=rps.your-domain.de
- Start Docker Compose
docker compose up -d
- Access Visit the app in your browser at: https://rps.deine-domain.de
For this, simply create the docker-compose.yml on the target system:
services:
rock-paper-scissors:
image: thyrail/rock-paper-scissors:latest
container_name: rps-app
# labels:
# - "traefik.enable=true"
# - "traefik.http.routers.rps.rule=Host(`${APP_DOMAIN}`)"
# - "traefik.http.routers.rps.entrypoints=websecure"
# - "traefik.http.routers.rps.tls.certresolver=le"
# - "traefik.http.services.rps.loadbalancer.server.port=${APP_PORT}"
# networks:
# - proxy
restart: always
#networks:
# proxy:
# external: true
Then execute the following commands in sequence:
# Das aktuelle Image zu beziehen
docker compose pull
# Container im "Detached Mode" zu starten
docker compose up -d
# Container zu stoppen und entfernen
docker compose down
The traefik.yml must be configured to add the app as a backend.
The docker-compose.yml
is already preconfigured to work with Traefik. If you want to change the internal port, adjust both server.js and docker-compose.yml accordingly.
The image is available on Docker Hub:
docker pull thyrail/rock-paper-scissors:latest
This is a simple template, so if you have ideas to improve it, feel free to contribute 😄 Contributions are welcome! Please open an issue or create a pull request.
This project is licensed under the MIT-License.