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.
docker pull thyrail/rock-paper-scissors:latest
docker run -d --name rps-app -p 3000:3000 thyrail/rock-paper-scissors:latest
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
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
traefik.yml configuration to match your setup.If using Traefik, you can configure the following environment variables in a .env file:
| Variable | Description |
|---|---|
| Email adress for Let's Encrypt. | |
| RPS_APP_DOMAIN | Domain where the app will be hosted. |
docker pull thyrail/rock-paper-scissors:latest
docker compose up -d
docker compose down
If you want to change the internal port, modify both the docker-compose.yml file and the server.js file.
This is a simple template, and contributions are welcome! Feel free to open an issue or submit a pull request.
This project is licensed under the MIT License.
Content type
Image
Digest
sha256:cf62d5443…
Size
378.3 MB
Last updated
about 2 months ago
docker pull thyrail/rock-paper-scissors