Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
asgrim committed Feb 4, 2022
0 parents commit 9d80d13
Show file tree
Hide file tree
Showing 9 changed files with 1,559 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/vendor/
8 changes: 8 additions & 0 deletions .phpstorm.meta.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php
namespace PHPSTORM_META {
override(\Psr\Container\ContainerInterface::get(0),
map([
'' => '@',
])
);
}
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: vendor/bin/heroku-php-apache2 web/
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Heroku CLI Example using Scout PHP

Simple Heroku CLI command example for Scout

## Running Heroku

NOTE: add your scout key to the example below:

```bash
heroku create
heroku config:set SCOUT_KEY=<add your scout key here> SCOUT_NAME=heroku-cli-example SCOUT_MONITOR=true
git push heroku main
heroku ps:scale web=0 # Not using web nodes for this example
heroku run php long-running-process.php
```

## Running Locally

NOTE: add your scout key to the example below:

```bash
export SCOUT_KEY=<add your scout key here>
export SCOUT_NAME=heroku-cli-example
export SCOUT_MONITOR=true

LONG_PROCESS_ITERATION_COUNT=3 WAIT_AFTER_ITERATION_SECS=1 SINGLE_ITERATION_SLEEP_SECS=1 php long-running-process.php
php short-process.php
```
25 changes: 25 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"name": "asgrim/scout-apm-php-heroku-cli-example",
"description": "Example application for testing Heroku CLI",
"type": "project",
"require": {
"php": "8.1.*",
"scoutapp/scout-apm-php": "^7.0",
"monolog/monolog": "^2.3",
"psr/log": "^1.0",
"laminas/laminas-servicemanager": "^3.10",
"psr/container": "^1.0"
},
"license": "MIT",
"autoload": {
"psr-4": {
"Asgrim\\ScoutApmPhpHerokuCliExample\\": "src/"
}
},
"authors": [
{
"name": "James Titcumb",
"email": "[email protected]"
}
]
}
Loading

0 comments on commit 9d80d13

Please sign in to comment.