-
Notifications
You must be signed in to change notification settings - Fork 14
Deployment
Production should be on the release branch, which when ready it fast forwarded to master and tagged with a version number
-
git pull
pull down the latest release code -
git submodule update --recursive
update the submodule's (can be skipped) -
git describe --always --tags --dirty >version
save the version number -
composer install --optimize-autoloader
ifcomposer.json
orcomposer.lock
has changed install the new php dependencies -
npm ci
ifpackage.json
orpackage-lock.json
has changed install the new js dependencies -
php artisan cache:clear
clear the application cache -
php artisan migrate
if there is a new migration indatabase/migrations
, update the DB structure -
php artisan doctrine:migrations:migrate
if there is a new doctrine migration indatabase/migrations_doctrine
, update the DB structure -
php artisan hms:database:refresh-views
if the database submodule has changes to the viewsdatabase/database/views/*.sql
, refresh them -
php artisan hms:database:refresh-procedures
if the database submodule has changes to the stored proceduresdatabase/database/procedures/sp_*.sql
, refresh them
note changes to stored functionsdatabase/database/procedures/fn_*.sql
, will need to be loaded by had with aSUPER
db user -
php artisan config:cache
if.env
has been changed, any file underconfig/
orcomposer
was ran
update the application config cache -
php artisan route:cache
if any file inroutes/
has changed orcomposer
was ran -
php artisan view:cache
if any file inresources/view/
orresources/lang/
has changed orcomposer
was ran -
php artisan event:cache
if anyapp/Event/
,app/Listeners/
orapp/Providers/EventServiceProvider.php
has changed orcomposer
was ran -
php artisan auth:clear-resets
TODO: LWK remember why this might be needed -
php artisan doctrine:clear:metadata:cache
if any changes in the mappingsapp/HMS/Mappings/
, clear doctrine metadata cache -
php artisan doctrine:clear:query:cache
clear doctrine query cache -
php artisan doctrine:clear:result:cache
clear results doctrine cache -
php artisan doctrine:generate:proxies
if any changes in the entitiesapp/HMS/Entities/
or mappingsapp/HMS/Mappings/
, generate the doctrine proxies -
php artisan permissions:sync
if any changes to the permissions or rolesconfig/roles.php
, you can check for issues first withphp artisan permissions:compare
-
php artisan meta:sync
if any changes to the Meta defaultsconfig/meta.php
, sync them -
php artisan db:seed --class ContentBlockSeeder
if any new ContentBlocks have been added todatabase/seeds/ContentBlockSeeder.php
, load them into the db -
php artisan horizon:terminate
restart the background workers so they pick up the new code, Check this has worked by visiting the/horizon
page, it may need a stronger kick withsudo systemctl restart horizon.service
-
php artisan ziggy:generate resources/js/ziggy.js
if any file inroutes/
has changed -
npm run production
ifnpm ci
orziggy:generate
was ran or anyresources/js/
,resources/sass/
file has changed
regenerate thejs
andcss
assets
git pull
git submodule update --recursive
git describe --always --tags --dirty >version
composer install --optimize-autoloader
npm ci
php artisan cache:clear
php artisan migrate
php artisan doctrine:migrations:migrate
php artisan hms:database:refresh-views
php artisan hms:database:refresh-procedures
php artisan config:cache
php artisan route:cache
php artisan view:cache
php artisan event:cache
php artisan auth:clear-resets
php artisan doctrine:clear:metadata:cache
php artisan doctrine:clear:query:cache
php artisan doctrine:clear:result:cache
php artisan doctrine:generate:proxies
php artisan permissions:sync
php artisan meta:sync
php artisan db:seed --class ContentBlockSeeder
php artisan horizon:terminate
php artisan ziggy:generate resources/js/ziggy.js
npm run production