'Php artisan storage:link delete stored files (DigitalOcean)

The case: I Upload a Laravel project on DigitalOcean with the next commands In Yaml file

run_command: |- 
php artisan migrate --force
php artisan storage:link
heroku-php-apache2 public/

The issue: Every deployment, these commands are being run and the storage files are deleted. How can I deploy without deleting uploaded files?

additional info:- 1- Table records are not deleted Just the uploaded files 2- imagePath: base_url/storage/images/products/imageName.png



Solution 1:[1]

The Solution: It's not an issue. the problem is every deployment, DigitalOcean deploys every time on a different server (Container) so It's like a new device. but tables are not cleared just storage stuff

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 mostafa abozaina