From 73ccce627cb6bbb910137505ccba97451143c7b8 Mon Sep 17 00:00:00 2001 From: Danny Coates Date: Mon, 24 Jul 2017 12:02:41 -0700 Subject: [PATCH] renamed environment variables to remove P2P_ prefix --- docker-compose.yml | 2 +- docs/docker.md | 16 +++++++++++++--- server/config.js | 10 +++++----- 3 files changed, 19 insertions(+), 9 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8274bde1..f72bf161 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,6 +7,6 @@ services: ports: - "1443:1443" environment: - - P2P_REDIS_HOST=redis + - REDIS_HOST=redis redis: image: redis:alpine diff --git a/docs/docker.md b/docs/docker.md index f45b770f..f94b23b3 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -3,12 +3,22 @@ | Name | Description |------------------|-------------| | `PORT` | Port the server will listen on (defaults to 1443). -| `P2P_S3_BUCKET` | The S3 bucket name. -| `P2P_REDIS_HOST` | Host name of the Redis server. +| `S3_BUCKET` | The S3 bucket name. +| `REDIS_HOST` | Host name of the Redis server. +| `GOOGLE_ANALYTICS_ID` | Google Analytics ID +| `SENTRY_CLIENT` | Sentry Client ID +| `SENTRY_DSN` | Sentry DSN +| `MAX_FILE_SIZE` | in bytes (defaults to 2147483648) | `NODE_ENV` | "production" ## Example: ```sh -$ docker run --net=host -e 'NODE_ENV=production' -e 'P2P_S3_BUCKET=testpilot-p2p-dev' -e 'P2P_REDIS_HOST=dyf9s2r4vo3.bolxr4.0001.usw2.cache.amazonaws.com' mozilla/send:latest +$ docker run --net=host -e 'NODE_ENV=production' \ + -e 'S3_BUCKET=testpilot-p2p-dev' \ + -e 'REDIS_HOST=dyf9s2r4vo3.bolxr4.0001.usw2.cache.amazonaws.com' \ + -e 'GOOGLE_ANALYTICS_ID=UA-35433268-78' \ + -e 'SENTRY_CLIENT=https://51e23d7263e348a7a3b90a5357c61cb2@sentry.prod.mozaws.net/168' \ + -e 'SENTRY_DSN=https://51e23d7263e348a7a3b90a5357c61cb2:65e23d7263e348a7a3b90a5357c61c44@sentry.prod.mozaws.net/168' \ + mozilla/send:latest ``` diff --git a/server/config.js b/server/config.js index 526d4eea..8e7e9873 100644 --- a/server/config.js +++ b/server/config.js @@ -4,12 +4,12 @@ const conf = convict({ s3_bucket: { format: String, default: '', - env: 'P2P_S3_BUCKET' + env: 'S3_BUCKET' }, redis_host: { format: String, default: 'localhost', - env: 'P2P_REDIS_HOST' + env: 'REDIS_HOST' }, listen_port: { format: 'port', @@ -25,12 +25,12 @@ const conf = convict({ sentry_id: { format: String, default: '', - env: 'P2P_SENTRY_CLIENT' + env: 'SENTRY_CLIENT' }, sentry_dsn: { format: String, default: '', - env: 'P2P_SENTRY_DSN' + env: 'SENTRY_DSN' }, env: { format: ['production', 'development', 'test'], @@ -40,7 +40,7 @@ const conf = convict({ max_file_size: { format: Number, default: 1024 * 1024 * 1024 * 2, - env: 'P2P_MAX_FILE_SIZE' + env: 'MAX_FILE_SIZE' } });