A one paragraph description about the container.
These instructions will cover usage information and for the docker container
| #!/bin/bash | |
| #New Relic API Key see https://docs.newrelic.com/docs/apis/rest-api-v2/requirements/api-key#creating | |
| NR_API_KEY="INSERT_API_KEY_HERE" | |
| #Find New Relic App Name, if your top level folder is not the name of your application change the below two lines to simply NR_APP_NAME="MY_APP_NAME". | |
| NR_APP_NAME=$(git rev-parse --show-toplevel) | |
| NR_APP_NAME=$(basename "$NR_APP_NAME") | |
| #Get the current git branch |
| # For example, run "npm install" | |
| docker run -v "$PWD":/usr/src/app -w /usr/src/app node:4 npm install | |
| # This command creates a container (downloading one first if you don't have it locally), runs the command in a current directory and quits the container | |
| # Great Success! |
| #!/usr/bin/php | |
| <?php | |
| // copied from https://gist.github.com/chelmertz/816166 | |
| // authored by Travis Swicegood | |
| // modified by Daniel Pinto and Israel Trindade | |
| class Enable | |
| { | |
| const PHP_LINT = true; |
(wherever it says url.com, use your server's domain or IP)
Login to new server as root, then add a deploy user
sudo useradd --create-home -s /bin/bash deploy
sudo adduser deploy sudo
sudo passwd deployAnd Update the new password
| #!/bin/bash | |
| stagedFiles=$(git diff-index --cached HEAD | grep ".php" | grep "^:" | sed 's:.*[DAM][ \\''t]*\([^ \\''t]*\):\1:g'); | |
| phpLintErrors=0 | |
| echo "PHP will now lint all the php staged files..." | |
| echo "" | |
| for file in $stagedFiles | |
| do | |
| echo "PHP is linting $file..."; | |
| echo "" | |
| php -l $file |