Build commands

composer install; npm run prod

# Get ready

# How build commands work

Build commands are a list of commands that will get executed after the fortrabbit GitHub app has received the latest updates from Git and before those are getting deployed into the web space of the environment. The Git updates, together with the results from the build steps are forming the build package to be released with a deployment.

# Automatic configuration

When setting up an app or environment, the fortrabbit GitHub app will use the stack detector to detect and autoconfigure all deployment settings, including build commands. Predefined software templates and detection are combined. The most basic auto detected build commands are:

  • When composer.json file is detected, composer install will run.
  • When package.json is discovered npm run prod will run.

# Manually editing build commands

Build commands can be found with the git deployment settings in the fortrabbit dashboard. Define them for each environment.

Log in to see the link here.

# Composer

Most PHP development is done with the help of frameworks or content management systems. These are usually installed as a dependency and themselves using other dependencies. All that code is not part of Git, so when the code get's delivered, those dependencies need to be installed or updated for the given environment. Find more details with our Composer article.

# Node.js

Most web development is done with the help of JavaScript build tooling. Specific production build steps create optimized build bundles to be served to clients from the web application.

Found a tpyo?Edit