renamed environment variables to remove P2P_ prefix

This commit is contained in:
Danny Coates 2017-07-24 12:02:41 -07:00
parent 9136694d29
commit 73ccce627c
No known key found for this signature in database
GPG Key ID: 4C442633C62E00CB
3 changed files with 19 additions and 9 deletions

View File

@ -7,6 +7,6 @@ services:
ports: ports:
- "1443:1443" - "1443:1443"
environment: environment:
- P2P_REDIS_HOST=redis - REDIS_HOST=redis
redis: redis:
image: redis:alpine image: redis:alpine

View File

@ -3,12 +3,22 @@
| Name | Description | Name | Description
|------------------|-------------| |------------------|-------------|
| `PORT` | Port the server will listen on (defaults to 1443). | `PORT` | Port the server will listen on (defaults to 1443).
| `P2P_S3_BUCKET` | The S3 bucket name. | `S3_BUCKET` | The S3 bucket name.
| `P2P_REDIS_HOST` | Host name of the Redis server. | `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" | `NODE_ENV` | "production"
## Example: ## Example:
```sh ```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
``` ```

View File

@ -4,12 +4,12 @@ const conf = convict({
s3_bucket: { s3_bucket: {
format: String, format: String,
default: '', default: '',
env: 'P2P_S3_BUCKET' env: 'S3_BUCKET'
}, },
redis_host: { redis_host: {
format: String, format: String,
default: 'localhost', default: 'localhost',
env: 'P2P_REDIS_HOST' env: 'REDIS_HOST'
}, },
listen_port: { listen_port: {
format: 'port', format: 'port',
@ -25,12 +25,12 @@ const conf = convict({
sentry_id: { sentry_id: {
format: String, format: String,
default: '', default: '',
env: 'P2P_SENTRY_CLIENT' env: 'SENTRY_CLIENT'
}, },
sentry_dsn: { sentry_dsn: {
format: String, format: String,
default: '', default: '',
env: 'P2P_SENTRY_DSN' env: 'SENTRY_DSN'
}, },
env: { env: {
format: ['production', 'development', 'test'], format: ['production', 'development', 'test'],
@ -40,7 +40,7 @@ const conf = convict({
max_file_size: { max_file_size: {
format: Number, format: Number,
default: 1024 * 1024 * 1024 * 2, default: 1024 * 1024 * 1024 * 2,
env: 'P2P_MAX_FILE_SIZE' env: 'MAX_FILE_SIZE'
} }
}); });