functions: DB -> DB_URL / MQ -> MQ_URL and related docs (#258)

This commit is contained in:
C Cirello
2016-11-10 02:02:32 +01:00
committed by Travis Reeder
parent c0a6002266
commit 4e41cac6e2
6 changed files with 14 additions and 14 deletions

View File

@@ -108,8 +108,8 @@ $ docker run -d --name functions-00 \
--network=functions-network \
-p 8080:8080 \
-v /var/run/docker.sock:/var/run/docker.sock \
-e 'MQ=redis://functions-redis' \
-e 'DB=postgres://postgres:mysecretpassword@functions-postgres/?sslmode=disable' \
-e 'MQ_URL=redis://functions-redis' \
-e 'DB_URL=postgres://postgres:mysecretpassword@functions-postgres/?sslmode=disable' \
iron/functions
```

View File

@@ -3,5 +3,5 @@ apiVersion: v1
metadata:
name: functions-config
data:
MQ: redis://redis-master.default
DB: postgres://postgres:mysecretpassword@postgresql-master.default/?sslmode=disable
MQ_URL: redis://redis-master.default
DB_URL: postgres://postgres:mysecretpassword@postgresql-master.default/?sslmode=disable

View File

@@ -20,16 +20,16 @@ spec:
env:
- name: DOCKER_HOST
value: unix:///var/run/docker.sock
- name: MQ
- name: MQ_URL
valueFrom:
configMapKeyRef:
name: functions-config
key: MQ
- name: DB
key: MQ_URL
- name: DB_URL
valueFrom:
configMapKeyRef:
name: functions-config
key: DB
key: DB_URL
volumeMounts:
- mountPath: "/var/run/docker.sock"
name: docker-socket

View File

@@ -2,10 +2,10 @@
A message queue is used to coordinate asynchronous function calls that run through IronFunctions.
We currently support the following message queues and they are passed in via the `MQ` environment variable. For example:
We currently support the following message queues and they are passed in via the `MQ_URL` environment variable. For example:
```sh
docker run -e "MQ=redis://localhost:6379/" ...
docker run -e "MQ_URL=redis://localhost:6379/" ...
```
## [Bolt](https://github.com/boltdb/bolt) (default)

View File

@@ -15,11 +15,11 @@ docker run -e VAR_NAME=VALUE ...
<th>Description</th>
</tr>
<tr>
<td>DB</td>
<td>DB_URL</td>
<td>The database URL to use in URL format. See [Databases](databases/README.md) for more information. Default: BoltDB in current working directory `bolt.db`.</td>
</tr>
<tr>
<td>MQ</td>
<td>MQ_URL</td>
<td>The message queue to use in URL format. See [Message Queues](mqs/README.md) for more information. Default: BoltDB in current working directory `queue.db`.</td>
</tr>
<tr>

View File

@@ -19,8 +19,8 @@ import (
const (
envLogLevel = "log_level"
envMQ = "mq"
envDB = "db"
envMQ = "mq_url"
envDB = "db_url"
envPort = "port" // be careful, Gin expects this variable to be "port"
envAPIURL = "api_url"
envNumAsync = "num_async"