Skip to content

Deploying to production

  • Strong DB_PASSWORD and DB_ROOT_PASSWORD in .env
  • SR_SALT set before the first signup
  • SR_CRON_HASH set, and cron jobs scheduled
  • SR_CRYPT_KEY set (openssl rand -hex 32) so sessions survive rebuilds
  • FUEL_ENV=production (the default in compose.yaml)
  • HTTPS in front of the app
  • SMTP configured in fuel/app/config/email.php if you want emails
  • Original Google Analytics tag and social links removed (see Configuration)
  • Database backups scheduled

The container serves plain HTTP on port 80. Put a reverse proxy in front of it. With Caddy, a Caddyfile like this gets and renews certificates automatically:

game.example.com {
reverse_proxy localhost:8080
}

To keep the game off the public interface, bind it to localhost in .env with APP_PORT=127.0.0.1:8080.

Terminal window
# Dump
docker compose exec -T db sh -c 'mysqldump -uroot -p"$MYSQL_ROOT_PASSWORD" --single-transaction "$MYSQL_DATABASE"' \
> backup-$(date +%F).sql
# Restore
docker compose exec -T db sh -c 'mysql -uroot -p"$MYSQL_ROOT_PASSWORD" "$MYSQL_DATABASE"' < backup.sql
Terminal window
git pull
docker compose up -d --build --wait

The database lives in the db-data volume and is kept across rebuilds. Read the release notes for any schema changes.

Log Command
Apache access/error docker compose logs -f app
Application (FuelPHP) docker compose exec app sh -c 'tail -f fuel/app/logs/*/*/*.php'
MySQL docker compose logs -f db

Each GitHub release includes secretrepublic-<version>.zip and .tar.gz archives with FuelPHP and all PHP libraries included. Extract one, point the web root at public_html/ and follow the manual install guide.

Releases use date-based tags: vYYYY.MM, plus .N for a second release in the same month (v2026.11.1). Tag the latest master and push the tag. GitHub Actions builds the archives, publishes the release as Latest and pushes a Docker image tagged with the same name.

Terminal window
git checkout master
git pull
git tag -a v2026.11 -m "Secret Republic v2026.11"
git push origin v2026.11

Tags with a suffix, such as v2026.12-rc1, are published as pre-releases and don’t replace Latest. To build the archive locally:

Terminal window
composer install --no-dev --optimize-autoloader
scripts/build-release.sh v2026.11 # writes dist/