Deploy logs

Published

Updated

📜

Debug deployments.

Each deployment on fortrabbit has its own deploy log with the output of the build commands and the post deploy commands. It is the first place to look when a deployment failed.

About deploy logs

The deploy log of a deployment holds the output of the build commands and the post deploy commands. It shows in the dashboard with the deployment, once the deployment has ended, and stays there for 10 days. Logs of the running app are in the environment logs.

A failed deployment is most often caused by the code or the configuration, and failures are common while a project is still being set up.

Build command errors

When a deployment failed and no new code went live, a build command failed. The error is at the end of the log. The software template presets the build commands, and the defaults do not fit every project.

Composer errors

Composer errors usually come from the project. Check composer.json and composer.lock for:

  • Invalid or conflicting version constraints
  • Missing PHP extensions
  • Repositories or packages that are no longer available

Node.js errors

For an error in npm run build or a similar script:

  • Are all Node dependencies in package.json?
  • Is the script defined in package.json?
  • Does the script succeed locally?

Post deploy command errors

Post deploy commands run after the new code is copied. When one of them fails, the deployment shows as failed, while the new code is already live. The log shows which command failed.

Fix a failing deployment

Read the error message in the log first. A common cause is a difference between local and remote: the environment on fortrabbit runs in production mode, while the local setup often runs a development build. Run the production build locally, for example composer install --no-dev and npm run build, and fix what fails there. More in deployment troubleshooting.

Contacting support

When contacting support about a failing deployment, include:

  • The app and environment
  • What changed before the deployment
  • The time of the failing deployment
  • The error message from the deploy log

Written by humans and AI in collaboration.

AI use & editorial processEdit on GitHub ↗