In Laravel docs, we recommend running ./artisan config:cache in production to speed ./artisan config:cache up. This is good with Heroku, since each build creates a new state for the file system, so we donβt even have to worry about clearing the cache between deployments.
BUT: if you add this command to your deployment procedure (for example, through Composer), your Laravel application will crash because it will look for files in existing build paths (something like /tmp/random_string ). If you run heroku run pwd , you will notice that the runtime is running on /app .
It seems that ./artisan config:cache stores the temporary build path in cached settings, and the application runs in a different path. Is it possible to change the path used in the resulting configuration cache?
source share