Build commands
composer install; npm run prod
# Get ready
- Follow the deployment section.
- Be ready to deploy code by git via the GitHub integration.
# 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.jsonfile is detected,composer installwill run. - When
package.jsonis discoverednpm run prodwill run.
# Manually editing build commands
Build commands can be found with the git deployment settings in the fortrabbit dashboard. Define them for each environment.
# 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