Upgrade OpenDataBio
Safe upgrade instructions for OpenDataBio installations
2 minute read
Use this page for the common deployment sequence. Before upgrading, read
UPGRADES_NOTES.md
from the target version of OpenDataBio. It is the authoritative source for
version-specific prerequisites, storage permissions, migrations, backfills and
repair commands; those instructions are intentionally not duplicated here.
Before you start
- Read the target version’s
UPGRADES_NOTES.mdand release notes. Record every required preflight check and post-migration command before starting. - Back up at least:
- Database dump
.env- the complete
storage/apptree, including media, generated exports and persisted dataset-version archives
- Compare current config files against target-version templates/settings:
.envagainst.env.example(includingassets_url)- Supervisor worker config (
/etc/supervisor/conf.d/opendatabio-worker.confor container equivalent) - PHP config (
php.inifor CLI and FPM/Apache)
- Plan a maintenance window for production.
Upgrade (Apache or nginx installation)
- Put application in maintenance mode:
cd /home/odbserver/opendatabio
php artisan down
- Update source code:
git fetch --tags
git checkout <target-tag-or-branch>
- Install dependencies and run migrations:
composer install --no-dev --optimize-autoloader
php artisan migrate:status
php artisan migrate --force
- Run the post-migration commands listed in the target version’s
UPGRADES_NOTES.md, in the documented order. Some commands submit background UserJobs; keep the application in maintenance mode and monitor them until completion when the notes require it. - Rebuild frontend assets after
.envchanges (required whenASSET_URLchanges):
npm run build
- Refresh caches and restart workers:
php artisan optimize:clear
php artisan config:cache
php artisan queue:restart
systemctl restart supervisor.service
# Restart the web server and PHP-FPM as appropriate for your installation.
- Verify the application, queue workers, logs and the operations named in the upgrade notes, then bring the application back online:
php artisan up
Upgrade (Docker installation)
- Update source code:
cd opendatabio
git fetch --tags
git checkout <target-tag-or-branch>
- Rebuild and restart containers:
make stop
make build
make start
- Install dependencies and run migrations:
make composer-install
make migrate
- Run the target version’s
UPGRADES_NOTES.mdpost-migration commands inside the application container, in the documented order, and monitor any UserJobs they submit. - Rebuild frontend assets after
.envchanges (required whenASSET_URLchanges):
npm run build
- Refresh caches and restart workers:
make optimize
docker compose exec -T -u www-data laravel php artisan queue:restart
Environment variables
Compare .env with the target version’s .env.example before building assets
or caching configuration. Follow UPGRADES_NOTES.md for variables whose value
or meaning changed; in production, verify APP_FORCE_HTTPS and ASSET_URL.
Rollback strategy
If something fails after migration:
- Keep maintenance mode on.
- Restore the database,
.env, and the matchingstorage/appbackup. Database rows and persisted dataset-version archives must be restored as one snapshot. - Checkout the previous known-good tag.
- Rebuild dependencies/containers and validate logs before
php artisan up.