Upgrading from Pro to Enterprise
Theoretically, this upgrade should go smoothly and without data loss. But before upgrading, we recommend that you back up your storage and MySQL volume in case something goes wrong.
Docker
The "mixpost" service should look like this:
mixpost:
image: inovector/mixpost-enterprise:latest
environment:
LICENSE_KEY: 'your_enterprise_license_key'
APP_URL: https://your-domain.com
APP_KEY: example_secret_key
DB_DATABASE: 'example_db_name'
DB_USERNAME: 'example_db_user'
DB_PASSWORD: 'example_db_password'
ports:
- 9000:80
volumes:
- storage:/var/www/html/storage/app
depends_on:
- mysql
- redis
restart: unless-stopped
Pull the image and recreate the containers with the following commands:
# Pull the latest version
docker-compose pull
# Stop and remove the old container
docker-compose down
# Start a new container
docker-compose up -d
In your Standalone or Laravel app
Delete the Pro package
composer remove inovector/mixpost-pro-team
If you installed Mixpost Pro using the Standalone app, may appear some error after removing it. No need to do anything, just skip it.
Install the Enterprise package
composer require inovector/mixpost-enterprise "^1.0"
After installing the Mixpost Enterprise package, you may execute this command:
php artisan mixpost-enterprise:install
At the question "Would you like to run the migrations now? (yes/no)" answer with "yes".
Next, it will ask you to create an admin user. If you already have one, you can cancel cancel the command.
To ensure that assets get republished each time Mixpost Enterprise is updated, we strongly advise you to add the following command to post-update-cmd
the scripts
section of your composer.json
.
"scripts": {
"post-update-cmd": [
...
"@php artisan mixpost-enterprise:publish-assets --force=true"
]
}
Exclude payment webhook handler route From CSRF Protection by adding the URI "*/payment-webhook" to the $except property of the VerifyCsrfToken middleware:
<?php
namespace App\Http\Middleware;
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
class VerifyCsrfToken extends Middleware
{
/**
* The URIs that should be excluded from CSRF verification.
*
* @var array<int, string>
*/
protected $except = [
'*/payment-webhook'
];
}
Modify the schedule command
In the console kernel (app/Console/Kernel.php
):
- Remove "\Inovector\Mixpost\Schedule::register($schedule)" command.
- Add "\Inovector\MixpostEnterprise\Schedule::register($schedule)" command.
protected function schedule(Schedule $schedule): void
{
// Remove or comment this command
# \Inovector\Mixpost\Schedule::register($schedule);
// Insert new command
\Inovector\MixpostEnterprise\Schedule::register($schedule);
$schedule->command('horizon:snapshot')->everyFiveMinutes();
$schedule->command('queue:prune-batches')->daily();
}
Clear cache
php artisan route:cache
php artisan mixpost:clear-settings-cache
php artisan mixpost:clear-services-cache
Terminate the Horizon process
php artisan horizon:terminate
The supervisor will start it automatically.
Conclusion
After you've upgraded to Enterprise, you can configure the settings for your business.