Quick start with Docker
The repository ships a compose.yaml that runs the game on PHP 8.5 + Apache and MySQL 9.7 LTS.
The database connection is configured from environment variables, so the setup wizard only asks for your
admin account.
Requirements
Section titled “Requirements”- Docker with the Compose plugin (
docker compose version) - About 1 GB of free disk space
Start the game
Section titled “Start the game”-
Clone the repository:
Terminal window git clone https://github.com/nenuadrian/secret-republic-browser-based-cyber-security-rpg-v4.gitcd secret-republic-browser-based-cyber-security-rpg-v4 -
(Recommended) Create a
.envfile with your own secrets. See Configuration:Terminal window cp .env.example .env# then edit .env: set DB passwords, SR_SALT, SR_CRON_HASH and SR_CRYPT_KEY -
Build and start the stack.
--waitreturns once both containers are healthy:Terminal window docker compose up -d --build --wait -
Open http://localhost:8080. You are redirected to
/setup. Choose an admin username (letters and digits), a password (5–30 characters) and an email address, then press install.
The wizard imports the schema and the starter missions, creates your account and logs you in. The lightning-bolt icon in the footer opens the Cardinal admin area.
What is running
Section titled “What is running”| Service | Image | Purpose |
|---|---|---|
app |
built from Dockerfile (php:8.5-apache) |
The game, served on port 8080 (APP_PORT) |
db |
mysql:9.7 |
Game database, stored in the db-data volume |
Everyday commands
Section titled “Everyday commands”docker compose logs -f app # Apache access/error logdocker compose exec app sh # shell inside the game containerdocker compose down # stop (data is kept)docker compose down -v # stop and DELETE the database volumedocker compose up -d --build --wait # rebuild after pulling new codeApplication logs are written to fuel/app/logs/ inside the container:
docker compose exec app sh -c 'tail -n 50 fuel/app/logs/*/*/*.php'Use the pre-built image
Section titled “Use the pre-built image”Every push to master and every release tag publishes a multi-arch image (amd64 and arm64) to the GitHub
Container Registry:
docker pull ghcr.io/nenuadrian/secret-republic-browser-based-cyber-security-rpg-v4:latestcompose.yaml already references this image name. To use the published image instead of building
locally, run docker compose pull && docker compose up -d.
Next steps
Section titled “Next steps”- Schedule the cron jobs so that rankings update and emails are sent.
- Read Deployment before exposing the server to the internet.
