Deploying to production
Checklist
Section titled “Checklist”- Strong
DB_PASSWORDandDB_ROOT_PASSWORDin.env -
SR_SALTset before the first signup -
SR_CRON_HASHset, and cron jobs scheduled -
SR_CRYPT_KEYset (openssl rand -hex 32) so sessions survive rebuilds -
FUEL_ENV=production(the default incompose.yaml) - HTTPS in front of the app
- SMTP configured in
fuel/app/config/email.phpif you want emails - Original Google Analytics tag and social links removed (see Configuration)
- Database backups scheduled
HTTPS with Caddy
Section titled “HTTPS with Caddy”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.
Backups
Section titled “Backups”# Dumpdocker compose exec -T db sh -c 'mysqldump -uroot -p"$MYSQL_ROOT_PASSWORD" --single-transaction "$MYSQL_DATABASE"' \ > backup-$(date +%F).sql
# Restoredocker compose exec -T db sh -c 'mysql -uroot -p"$MYSQL_ROOT_PASSWORD" "$MYSQL_DATABASE"' < backup.sqlUpgrading
Section titled “Upgrading”git pulldocker compose up -d --build --waitThe 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 |
Without Docker
Section titled “Without Docker”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.
Publishing a release (maintainers)
Section titled “Publishing a release (maintainers)”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.
git checkout mastergit pullgit tag -a v2026.11 -m "Secret Republic v2026.11"git push origin v2026.11Tags with a suffix, such as v2026.12-rc1, are published as pre-releases and don’t replace Latest.
To build the archive locally:
composer install --no-dev --optimize-autoloaderscripts/build-release.sh v2026.11 # writes dist/