Install steps for Laravel Vapor with docker
Follow the below steps to install Atatus agent in Vapor dockerfile.
Add Atatus configuration in Vapor staging or production dockerfile.
copyFROM laravelphp/vapor:php80 RUN wget https://s3.amazonaws.com/atatus-artifacts/atatus-php/downloads/atatus-php-1.16.0-x64-musl.tar.gz && \ tar -zxvf atatus-php-1.16.0-x64-musl.tar.gz && \ cd atatus-php-1.16.0-x64-musl && \ ATATUS_LICENSE_KEY="<YOUR_LICENSE_KEY>" ATATUS_APP_NAME="<YOUR_APP_NAME>" \ ATATUS_RELEASE_STAGE="production" /bin/sh install.sh && \ sh -c "sed -i -e 's/atatus\.guzzle\.enable_extension = .*/atatus\.guzzle\.enable_extension = true/' /usr/local/etc/php/conf.d/atatus.ini" && \ sh -c "sed -i -e 's/atatus\.framework = .*/atatus\.framework\ = \"Laravel\"/' /usr/local/etc/php/conf.d/atatus.ini" && \ sh -c "sed -i -e 's/atatus\.predis\.enable_extension = .*/atatus\.predis\.enable_extension = true/' /usr/local/etc/php/conf.d/atatus.ini" && \ sh -c "sed -i -e 's/atatus\.collector\.log_file = .*/atatus\.collector\.log_file = \"\/tmp\/collector.log\"/' /usr/local/etc/php/conf.d/atatus.ini" && \ sh -c "sed -i -e 's/atatus\.agent\.log_file = .*/atatus\.agent\.log_file = \"\/tmp\/agent.log\"/' /usr/local/etc/php/conf.d/atatus.ini" COPY . /var/task
Set
ATATUS_PHP_COLLECTOR_ALIVE_TIMEOUT_INTERVAL
in Vapor environment variable like below.copyATATUS_PHP_COLLECTOR_ALIVE_TIMEOUT_INTERVAL=8000
After setting up the above configuration, deploy the changes and you will see the performance data within few minutes.
copyphp vendor/bin/vapor deploy
Important:
You should use only deploy command. Redeploy will not work properly.