August 25, 2022
The topic discussed here is not covered by Curator support and is not recommended as it is difficult to predict all the ways this may cause problems as the platform evolves. This is only a guide provided as an attempt to make your life easier if you need to containerize Curator due to internal IT policies. By taking the approach discussed below, you are assuming the burden of setting it up to work in your environment, maintaining it as needed and fixing issues as they arise. You’ve been warned. Good luck!
This is mostly an implementation detail for you to figure out for your container platform. However, we highly recommend starting with one of our official Curator installers as a base. If needed, you can configure things like database connection details, persistent storage location, license key or other advanced configuration during the installation. The Linux installer includes various arguments to set these. See the section on “Custom Setup” at this link for more details.
Curator uses a small database to house your portal’s configuration. This database and all of its data need to persist between rebuilds of your container. It may be better to use an external database, such as a centralized MariaDB installation or something like Amazon RDS.
While Curator’s code can be rebuilt within a container, Curator stores uploaded files to the <web root>/storage/ directory. This directory will need to be retained between rebuilds of the container.
Curator’s configuration files don’t necessarily need to be persistent, however, it is important to retain the database encryption key from the <web root>/config/app.php configuration file across rebuilds. If not, you will lose the ability decrypt existing data from the database. Also, make sure to retain any other customizations you may have made within this directory, such as the database connection within <web root>/config/database.php.
There are two parts to a Curator upgrade that happen during a normal one-click upgrade. These will need to be accounted for in your container environment to keep rebuilds from reverting to the previous version of your portal. In fact, when hosting Curator in a containerized manner, it’s recommended to disable all upgrades through the interface for this reason.
To update Curator’s code, use the manual update link found in your portal to download the zip archive. It will need to be extracted and everything inside of the core directory of that extract (but not the directory itself) copied over the web root directory of your installation.
As features are added to Curator, small tweaks to the database need to be made. These database updates are included as migration scripts in the above code updates. Once the code has been updated, the database migration scripts can be executed by running the following command from the portal’s web root folder.
Linux (Redhat-like systems):
sudo -u apache php artisan portal:migrate
Linux (Ubuntu-like systems):
sudo -u www-data php artisan portal:migrate
php.exe artisan portal:migrate