fix(infra) : fix document storage double nesting in prod
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
Some checks failed
Auto Tag Develop / tag (push) Has been cancelled
Les fichiers documents étaient stockés sous storage/storage/documents/ au lieu de storage/ directement, causant des 404 en prod. Le deploy script corrige la structure et le Dockerfile crée le répertoire var/storage/documents dans l'image. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,19 @@ export INVENTORY_IMAGE_TAG="$TAG"
|
||||
|
||||
echo "==> Deploying inventory:${TAG}..."
|
||||
|
||||
# Fix storage directory structure (one-time migration fix)
|
||||
# Files were nested under storage/storage/documents/ instead of storage/ directly
|
||||
if [ -d "storage/storage/documents" ]; then
|
||||
echo "==> Fixing storage directory structure..."
|
||||
cp -a storage/storage/documents/* storage/ 2>/dev/null || true
|
||||
rm -rf storage/storage
|
||||
echo "==> Storage structure fixed."
|
||||
fi
|
||||
|
||||
# Ensure storage directory exists with correct ownership
|
||||
mkdir -p storage
|
||||
sudo chown -R www-data:www-data storage
|
||||
|
||||
echo "==> Enabling maintenance mode..."
|
||||
touch maintenance.on
|
||||
|
||||
|
||||
Reference in New Issue
Block a user