spiritedmedia / systems

Code and documentation for building, deploying, and serving code.
1 stars 1 forks source link

Add google-service-account-credentials.json File #29

Closed kingkool68 closed 6 years ago

kingkool68 commented 6 years ago

The Google Analytics API needs to load credentials from a JSON file. This contains a private key that the PHP library uses to sign each request sent to the API. For security purposes this needs to be live above the web server root so it is not accessible from the web. On the live server the location needs to be in /var/www/spiritedmedia.com/credentials/google-service-account-credentials.json The contents of the file are stored in 1Password.

Steps after SSHing into the server:

cd /var/www/spiritedmedia.dev
sudo mkdir credentials
sudo vim credentials/google-service-account-credentials.json
# Paste the JSON credentials in and save the file
sudo chown -R www-data: credentials/

See https://github.com/spiritedmedia/spiritedmedia/pull/2339