More Details regarding Laravel Majestic Monolith on Railway?
alex-bytes
PROOP

a year ago

I'm wondering if there's more detailed information around the Laravel Majestic Monolith setup on railway. For example, I would like to know what commands are run by default when incorporating the base files with the minimal amount of code such as build-app.sh using:

```#!/bin/bash

Make sure this file has executable permissions, run chmod +x build-app.sh

Exit the script if any command fails

set -e

Build assets using NPM

npm run build

Clear cache

php artisan optimize:clear

Cache the various components of the Laravel application

php artisan config:cache
php artisan event:cache
php artisan route:cache
php artisan view:cache```

  • Can I expect commands like "composer install to run automatically by Railway's deployment handling?

  • If so, does Railway run composer install in each service (App, Cron, Worker) or only in specific ones?

  • What different instructions does Railway give to the cron and worker apps based on their build.sh ?

I'd love to have more documentation on this but all I can find is: https://docs.railway.com/guides/laravel

6 Replies

alex-bytes
PROOP

a year ago

cdf1815d-d3de-4820-866b-7fea03248e92


a year ago

cc @Prosper


alex-bytes
PROOP

a year ago

Thanks @Prosper .

It's helpful to know composer install is run automatically. Being relatively new to this, is the user supposed to "know" this? As in, is it obvious composer install runs every time with railway's deploy mechanism even if not explicitly stated in the build files? I imagine this must be documented somewhere? Or is it so obvious it needs no documentation?


alex-bytes
PROOP

a year ago

Btw this question is 100% genuine, I'm still learning.


alex-bytes
PROOP

a year ago

Damn I got as far as reading the nixpacks docs but I didn't find them helpful - probably a skill issue


alex-bytes
PROOP

a year ago

can't believe I missed checking the build logs though..


Loading...