Install steps for Laravel Vapor with docker

Follow the below steps to install Atatus agent in Vapor dockerfile.

  1. Add Atatus configuration in Vapor staging or production dockerfile.

    copy
    icon/buttons/copy
    FROM laravelphp/vapor:php80
    
    RUN wget https://s3.amazonaws.com/atatus-artifacts/atatus-php/downloads/atatus-php-1.15.0-x64-musl.tar.gz && \
        tar -zxvf atatus-php-1.15.0-x64-musl.tar.gz && \
        cd atatus-php-1.15.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
    
  2. Set ATATUS_PHP_COLLECTOR_ALIVE_TIMEOUT_INTERVAL in Vapor environment variable like below.

    copy
    icon/buttons/copy
    ATATUS_PHP_COLLECTOR_ALIVE_TIMEOUT_INTERVAL=8000
    

    Atatus Laravel Vapor

    Atatus Laravel Vapor

  3. After setting up the above configuration, deploy the changes and you will see the performance data within few minutes.

    copy
    icon/buttons/copy
    php vendor/bin/vapor deploy