a year ago
Hi Team,We are trying to migrate all our application to railway, since we appreciate the whole infrastructure.However, while migrating one of our old apps, we have come to this issueThe /app/bootstrap/cache directory must be present and writableSo what I did was:1. create an sh file that is triggered upon build, which contains this `sudo chmod -R ug+rwx storage bootstrap/cache`2. I also implemented this on the nixpacks.toml on the phases.build but still doesn't work.The application is:1. Laravel 92. LivewireI appreciate any help to move the needle and have all applications migrate possibly on Railway.Here's the full nixpacks.toml[variables]
UPLOAD_MAX_FILESIZE = '1024M'
POST_MAX_SIZE = '1024M'
MEMORY_LIMIT = '2048M'
[phases.setup]
cmds = ['UPLOAD_INI_PATH=$(find /nix/store/*-php-*/lib -name php.ini -print0 | head -z -n 1 | rev | cut -c 9- | rev)/upload.ini; echo "upload_max_filesize=${UPLOAD_MAX_FILESIZE};" >> $UPLOAD_INI_PATH; echo "post_max_size=${POST_MAX_SIZE};" >> $UPLOAD_INI_PATH; echo "memory_limit=${MEMORY_LIMIT};" >> $UPLOAD_INI_PATH;']
[phases.build]
cmds = ['chmod 777 -R ./bootstrap/cache']
Any help is well appreciated.
4 Replies
a year ago
I would try moving the chmod to the start command and also make sure that the folder does actually exist.
a year ago
Hi,Thanks I am trying this now.
a year ago
Hi this is good now, still cant make it writable. But fouund an alternative, this is now closed. Thanks
Status changed to Solved railway[bot] • 12 months ago