Permalink
Browse files

Adding API key environment variable and better logging.

  • Loading branch information...
grugnog committed Jun 30, 2015
1 parent 7008137 commit d2e5a4e6f644584942969edbf30eedb2af295bc8
Showing with 11 additions and 1 deletion.
  1. +6 −0 DEVOPS_MANUAL.md
  2. +2 −0 backend/configuration/php-fpm.conf
  3. +2 −0 backend/docker-compose.yml
  4. +1 −1 backend/web/index.php
View
@@ -20,6 +20,7 @@ The development environment is fully self-contained, and is based on Docker and
### Requirements
1. [Docker](https://www.docker.com/)
1. [Docker Compose](https://docs.docker.com/compose/)
1. An [FDA API Key](https://open.fda.gov/api/reference/#your-api-key)
### Instructions
@@ -31,6 +32,11 @@ cd nebula
If you are using boot2docker, make sure it is started up and it's shell environment variable are available before continuing.
Export your FDA API Key, adding it to the end of this command:
```
export FDA_API_KEY=
```
To start docker containers, initiate database schemas and import:
```
./bin/build
@@ -1,6 +1,7 @@
[global]
error_log = /proc/self/fd/2
daemonize = no
log_level = warning
[www]
# BOOT2DOCKER LIMITATIONS
@@ -12,6 +13,7 @@ php_admin_value[date.timezone] = 'America/New_York'
php_admin_flag[short_open_tag] = off
access.log = /proc/self/fd/2
catch_workers_output = yes
listen = [::]:9000
pm = dynamic
pm.max_children = 100
@@ -5,6 +5,8 @@ web:
volumes:
- .:/var/www/nebula
- ./configuration/nginx.conf:/etc/nginx/conf.d/default.conf
environment:
- FDA_API_KEY
links:
- php
php:
View
@@ -42,7 +42,7 @@ function queryFDA($search) {
$response = $client->get('https://api.fda.gov/drug/event.json', [
'http_errors' => FALSE,
'query' => [
'api_key' => 'rv4OOon6fPJOHBbFHClUOs3BRGSbAEUdg3ACp2pu',
'api_key' => $_ENV['FDA_API_KEY'],
'search' => $search,
'count' => 'patient.reaction.reactionmeddrapt.exact'],
]);

0 comments on commit d2e5a4e

Please sign in to comment.