Rebuilding openLogForge Docker container
This guide covers how to rebuild an existing Docker Compose deployment of openLogForge from scratch.
Back up your data before updating
Always create a database backup before pulling a new version. See Step 1 below.
Step 1 - Back up the database
The database lives inside a Docker named volume (olf-data). Export a copy to the host before making any changes.
# Create a backup directory if it does not exist
mkdir -p ~/openlogforge-backups
# Copy the database out of the running container
docker compose exec app sh -c "cp /data/openlogforge.db /tmp/openlogforge-backup.db"
docker compose cp app:/tmp/openlogforge-backup.db \
~/openlogforge-backups/openlogforge-$(date +%Y%m%d-%H%M%S).db
echo "Backup saved to ~/openlogforge-backups/"
ls -lh ~/openlogforge-backups/
Step 2 - Check the current version
Note the current version tag so you can roll back to it if needed.
Step 3 - Rebuilding procedure
Stop containers, remove the olf-data volume (drops openlogforge.db):
Rebuild docker images ignoring Docker layer cache:
Check CHANGELOG.md for breaking changes or manual migration steps:
Step 4 - Start container
Docker rebuilds both images, stops the old containers, and starts the new ones. Alembic database migrations run automatically during backend startup before the API becomes available.
Step 5 - Verify the rebuild
Check both containers are running:
Expected output:
NAME IMAGE STATUS PORTS
openlogforge-app-1 openlogforge-app Up 8000/tcp
openlogforge-web-1 openlogforge-web Up 0.0.0.0:80->8080/tcp
Check the backend logs for migration output and a clean start:
Look for lines similar to:
Confirm the web interface loads correctly in your browser.