Sign inSign up

thyrail/rock-paper-scissors

By thyrail

Updated about 2 months ago

Image
0

809

thyrail/rock-paper-scissors repository overview

🪨📜✂️ Rock-Paper-Scissors App Template

A small, web-based rock-paper-scissors game that can be played against the computer. The app runs in a Docker container and can optionally integrate with Traefik as a reverse proxy for HTTPS.

🚀 Features

  • Web-based: Simple browser interface for a quick game.
  • Traefik integration: Automatic HTTPS via Let's Encrypt.
  • Dockerized: Platform-independent thanks to Docker.
  • ARM-Compatible: Supports both ARM (e.g., Raspberry Pi) and x86 architectures.

📦 How to Use

🛠 Docker Setup
  1. Pull the Docker image:
docker pull thyrail/rock-paper-scissors:latest
  1. Run the container:
docker run -d --name rps-app -p 3000:3000 thyrail/rock-paper-scissors:latest

🐋 Docker Compose Setup (Optional)

If you'd like to use Docker Compose, here's a minimal docker-compose.yml:

services:
  rock-paper-scissors:
    image: thyrail/rock-paper-scissors:latest
    container_name: rps-app
    ports:
      - "3000:3000"
    restart: always

To start the app:

docker compose up -d

🌐 Optional: Traefik Integration

To integrate with Traefik for HTTPS, you can use the following docker-compose.yml:

services:
  rock-paper-scissors:
    image: thyrail/rock-paper-scissors:latest
    container_name: rps-app
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.rps.rule=Host(`rps.your-domain.com`)"
      - "traefik.http.routers.rps.entrypoints=websecure"
      - "traefik.http.routers.rps.tls.certresolver=le"
    networks:
      - proxy
    restart: always

networks:
  proxy:
    external: true
  • Make sure your domain is pointing to your server.
  • Update the traefik.yml configuration to match your setup.

🌟 Environment Variables

If using Traefik, you can configure the following environment variables in a .env file:

VariableDescription
EMAILEmail adress for Let's Encrypt.
RPS_APP_DOMAINDomain where the app will be hosted.

📖 Additional Commands

Update the Container
docker pull thyrail/rock-paper-scissors:latest
docker compose up -d
Stop the Container
docker compose down

🛠 Configuration Options

Change the Port

If you want to change the internal port, modify both the docker-compose.yml file and the server.js file.

🤝 Contributing

This is a simple template, and contributions are welcome! Feel free to open an issue or submit a pull request.

📄 License

This project is licensed under the MIT License.

Tag summary

Content type

Image

Digest

sha256:cf62d5443

Size

378.3 MB

Last updated

about 2 months ago

docker pull thyrail/rock-paper-scissors