Upgrade OpenDataBio
Safe upgrade instructions for OpenDataBio installations
2 minute read
Use this guide to upgrade an existing OpenDataBio installation with minimal downtime.
Before you start
- Read the target release notes and confirm any breaking changes.
- Back up at least:
- Database dump
.envstorage/app/public/media
- 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
- Rebuild frontend assets after
.envchanges (required whenassets_urlchanges):
npm run build
- Refresh caches, clean logs, and restart workers:
php artisan optimize:clear
php artisan config:cache
php artisan queue:restart
systemctl restart supervisor.service, nginx+phpfpm or apache, mysql or mariadb
echo "" > storage/logs/laravel.log
echo "" > storage/logs/supervisor.log
- Bring app 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
- Rebuild frontend assets after
.envchanges (required whenassets_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
If the target version introduces new environment variables, compare .env with .env.example and add missing keys before asset/cache/worker commands in production.
Rollback strategy
If something fails after migration:
- Keep maintenance mode on.
- Restore database backup and
.env. - Checkout the previous known-good tag.
- Rebuild dependencies/containers and validate logs before
php artisan up.