Closed arjenfvellinga closed 3 years ago
I could, but would it not be easier to just run it inside the container? Since this isn't something you'd be doing regularly.
docker exec spotweb /usr/bin/php /var/www/spotweb/bin/upgrade-db.php --clear-cache -yes
Also, when the image is replaced with a newer version, the cache will be cleared because of the new container.
True, that I don't know how often I would want to execute this. I don't restart the dockers that often, so for me clearing the cache at restart would be ok. But I'm fine to make a cron job on my machine for this.
OK, great. I'm closing this issue.
Is it possible for you to add a boolean environment variable that execute the following command on startup:
root@spotweb:/var/www/spotweb/bin# php upgrade-db.php --clear-cache -yes