How to deploy and install new addons on staging environments

hugogilmar - 2 months ago

Hi guys,

I'm working with addons as features for my project. I've been using Deployer for publishing on a staging server. Everytime I deploy a new feature (addon), I'm dealing with errors like: Class 'Anomaly\Streams\Platform\Model\Users\UsersRolesEntryModel' not found.

For earlier deploys I've created a bash script with the following commands:

#!/usr/bin/env bash

sed -i 's/INSTALLED=true/INSTALLED=false/g' .env

php artisan migrate --force --streams
php artisan migrate --force
php artisan migrate --force --all-addons
php artisan streams:compile
php artisan streams:publish --force

sed -i 's/INSTALLED=false/INSTALLED=true/g' .env

exit 0;

What's the right way to deploy new addons to a staging server?

Thanks for your help.

hugogilmar - 2 months ago


Here an update. We discover an issue with the forlder storage/streams. From a new git checkout, any artisan command failed. We just add storage/streams as a shared folder on Deployer script (linked directory to a shared path) and upload our local storage/streams content.

After this, the project worked again.

How is supposed to handle this, or how can we recreate this folder content without issues. By default it contains an .gitkeep file ignoring all it content.

Thanks again for your help.

ryanthompson - 2 months ago

The only thing you need from storage is the models - which will regen with the streams:compile command but in your case you must first mark as uninstalled. If this does not work - what is the specific error from logs you are experiencing?

hugogilmar - 2 months ago

The problem is I can't run any php artisan command. Every time it throws an Class 'Anomaly\Streams\Platform\Model\Users\UsersRolesEntryModel' not found.