There are two ways to install Atatus in Heroku PHP apps.

PHP Apps with Composer

Follow the below steps to install Atatus in Heroku.

  1. Set Atatus Heroku PHP extension repo

    copy
    icon/buttons/copy
    heroku config:set HEROKU_PHP_PLATFORM_REPOSITORIES="https://s3.amazonaws.com/atatus-php-heroku-ext/heroku/"
    

    You need to set license key in the config to enable Atatus on Heroku.

    copy
    icon/buttons/copy
    heroku config:set ATATUS_LICENSE_KEY="lic_apm_********" ATATUS_APP_NAME="My PHP App"
    
  2. Add Atatus Heroku extension in composer.json from the previous remote package repository.

    copy
    icon/buttons/copy
    {
        "require": {
            "ext-atatus": "1.15.0"
        },
        "config": {
            "platform": {
                "ext-atatus": "1.15.0"
            }
        }
    }
    
  3. Install Atatus Heroku extension.

    copy
    icon/buttons/copy
    composer update ext-atatus
    
  4. Commit those changes to Heroku and deploy your application once again.

    copy
    icon/buttons/copy
    git add composer.json composer.lock
    git commit -m 'Add ext-atatus dependency to Heroku app'
    git push heroku master
    

PHP Apps without Composer

For PHP apps without composer, you shall be using Atatus Heroku PHP Buildpack. Follow the below steps to install Atatus in Heroku.

  1. Set Atatus Heroku PHP extension repo

    copy
    icon/buttons/copy
    heroku config:set HEROKU_PHP_PLATFORM_REPOSITORIES="https://s3.amazonaws.com/atatus-php-heroku-ext/heroku/"
    
  2. Set Atatus Heroku PHP buildpack repo

    copy
    icon/buttons/copy
    heroku buildpacks:set https://github.com/atatus/heroku-buildpack-php-atatus.git
    
  3. Go to atatus project settings, then click on Install Agent tab and copy your license key and follow below commands

    copy
    icon/buttons/copy
    heroku config:set ATATUS_LICENSE_KEY="lic_apm_********" ATATUS_APP_NAME="My PHP App"
    
  4. Deploy to Heroku.

    copy
    icon/buttons/copy
    git commit --allow-empty -m "Rebuild slug"
    git push heroku master