How to safely move to new versions of Black Candy Store.
⚠️ Always read the release notes before upgrading. New versions may include breaking changes or required migration steps.
Pull the new image, remove the old container, and start fresh:
# Pull latest
docker pull ghcr.io/ajeskey/blackcandystore:latest
# Stop and remove old container
docker stop blackcandystore
docker rm blackcandystore
# Start with the new image (use your existing options)
docker run -d --name blackcandystore \
-v ./storage_data:/rails/storage \
-v /path/to/music:/media_data \
-e MEDIA_PATH=/media_data \
-e SECRET_KEY_BASE=your_secret \
-p 80:80 \
ghcr.io/ajeskey/blackcandystore:latest
docker pull ghcr.io/ajeskey/blackcandystore:latest
docker-compose down
docker-compose up -d
Before any upgrade, back up your data:
storage_data directorypg_dump on your database# SQLite backup
cp -r ./storage_data ./storage_data_backup_$(date +%Y%m%d)
Instead of :latest, you can pin to a specific version tag for more control over when you upgrade:
docker run -p 80:80 ghcr.io/ajeskey/blackcandystore:v1.2.0
Database migrations run automatically on container startup. If a migration fails, the container will exit with an error. Check the logs:
docker logs blackcandystore
If something goes wrong:
# Restore backup
rm -rf ./storage_data
cp -r ./storage_data_backup_20250101 ./storage_data
# Run previous version
docker run -p 80:80 ghcr.io/ajeskey/blackcandystore:v1.1.0
Downgrades are not always safe — newer migrations may not be reversible. Always test upgrades in a staging environment first if possible.