updates functions -> fnserver (#516)

* updates functions -> fn-server and fnlb -> fn-lb

* changed to fnserver and fnlb
This commit is contained in:
Travis Reeder
2017-11-17 15:53:44 -08:00
committed by GitHub
parent 94607d898d
commit ab18e467fa
13 changed files with 37 additions and 38 deletions

View File

@@ -1,34 +1,34 @@
# Fn using Postgres
Let's presuppose you don't have even a postgres DB ready.
Let's suppose you don't have even a postgres DB ready.
### 1. Let's start a postgres instance:
## 1. Let's start a postgres instance
```
```sh
docker run --name func-postgres \
-e POSTGRES_PASSWORD=funcpass -d postgres
```
### 2. Now let's create a new database for Functions
## 2. Now let's create a new database for Functions
Creating database:
```
```sh
docker run -it --rm --link func-postgres:postgres postgres \
psql -h postgres -U postgres -c "CREATE DATABASE funcs;"
```
Granting access to postgres user
```
```sh
docker run -it --rm --link func-postgres:postgres postgres \
psql -h postgres -U postgres -c 'GRANT ALL PRIVILEGES ON DATABASE funcs TO postgres;'
```
### 3. Now let's start Functions connecting to our new postgres instance
## 3. Now let's start Functions connecting to our new postgres instance
```
```sh
docker run --rm --privileged --link "func-postgres:postgres" \
-e "DB_URL=postgres://postgres:funcpass@postgres/funcs?sslmode=disable" \
-it -p 8080:8080 fnproject/functions
-it -p 8080:8080 fnproject/fnserver
```