-
-
Notifications
You must be signed in to change notification settings - Fork 7
Deployment procedure
What exactly happens with a deployment can be found in the .github/workflows
folder. But in short, this is the set of commands that are executed. Most of which speak for themselves:
php artisan readonly:enable &&
php artisan db:backup &&
php artisan up;
php artisan down --render="errors::503" --retry 60;
php artisan environment:updateprepare live &&
php artisan environment:update live &&
php artisan report:release discord &&
php artisan report:release reddit;
php artisan readonly:disable &&
php artisan up
In order to reduce the actual downtime of Keystone.guru when doing a release, readonly mode was introduced. During this time, no POST, PUT and DELETE requests are allowed (see app/Http/Middleware/ReadOnlyMode.php
). This effectively makes the site read-only. This mode is useful for the time a database backup is performed. There's still some possibility of automated processes performing writes during this time and info getting lost, but I never had any problems with this.
Database backup is performed using mysqldump
, and the target file is written to my personal NAS for safekeeping. This will need to be professionalized. See https://github.com/Wotuu/keystone.guru/wiki/Database-backup.
See https://laravel.com/docs/10.x/configuration#maintenance-mode
This prepares the environment for update. First thing is to clear all hotfixes and pull the repository. Now that we have the latest changes, we can perform an npm install
and a composer install
. This is all a bit yanky, ideally I want to use PHP Deployer to do the deployments in a better way - then I can also deploy with very minimal downtime, if any. See https://github.com/Wotuu/keystone.guru/wiki/PHP-Deployer.
Runs database migrations, seeders, creates a new Github release, optimizes the site, refreshes cache. You can choose the different environment between live
, local
, mapping
, staging
, testing
. Some settings are different based on the environment. Debug environments require debug packages, forgo optimizations, etc. so ensure you pick the correct environment when updating to get the desired result. Generally though, you should only call this command with local
to update your local working environment and that's it.
This speaks for itself really - it puts out the release to third-parties such as Reddit, Github, Discord.
- Fundamentals
- Maintaining the server
- Maintaining Keystone.guru
- Creating a new Release
- Creating a new Expansion
- Creating a new Season
- Creating a new Affix
- Creating a new Dungeon
- Creating new map tiles
- Creating new NPC Portrait icons
- Creating a new Affix
- Creating mapping for a new Dungeon
- Editing an existing mapping (through MDT)
- Adding support for dungeon facades
- Technical debt