deployer
deployer copied to clipboard
Downtime during deployment. Missing Composer autoload file. Failed to open stream: No such file or directory
- Deployer version:
deployer/deployer": "^7.3 - Deployment OS:
Ubuntu 20.04.6 LTS
import:
- recipe/deploy/cleanup.php
- recipe/laravel.php
- contrib/npm.php
config:
keep_releases: 5
application: '{My application name}'
repository: '{My private repo}'
base_deploy_path: '/var/www'
remote_user: ubuntu
identity_file: '{My key}'
become: 'root'
hosts:
production:
deploy_path: '{{base_deploy_path}}/{My web site}'
hostname: '{My IP}'
port: {My port}
tasks:
deploy:
- deploy:prepare
- deploy:vendors
- deploy:unlock
after:
deploy:failed:
- deploy:unlock
deploy:update_code:
- npm:install
npm:install:
- npm:build
My project takes a few minutes to deploy. During this period the whole site goes down. I checked the Nginx error logs and it seems my autoload.php for Composer goes missing during the deployment. The deployment itself is successful and will come back online once completed.
2024/01/09 16:20:37 [error] 1217744#1217744: *201 FastCGI sent in stderr: "PHP message: PHP Warning: require(/var/www/{My web site}/releases/15/public/../vendor/autoload.php): Failed to open stream: No such file or directory in /var/www/{My web site}/releases/15/public/index.php on line 34PHP message: PHP Fatal error: Uncaught Error: Failed opening required '/var/www/{My web site}/releases/15/public/../vendor/autoload.php' (include_path='.:/usr/share/php') in /var/www/{My web site}/releases/15/public/index.php:34
Stack trace:
#0 {main}
thrown in /var/www/{My web site}/releases/15/public/index.php on line 34" while reading response header from upstream, client: 51.155.34.90, server: {Any sub domain}.{My web site}.net, request: "GET /{My web site}/{Any web page} HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/php8.1-fpm.sock:", host: "{Any sub domain}.{My web site}.net", referrer: "{Any sub domain}.{My web site}.net"
{Curly brackets} omitted for sensitivity.
Upvote & Fund
- We're using Polar.sh so you can upvote and help fund this issue.
- We receive the funding once the issue is completed & confirmed by you.
- Thank you in advance for helping prioritize & fund our backlog.