github.com/iron-io/functions@v0.0.0-20180820112432-d59d7d1c40b2/docs/operating/databases/postgres.md (about)

     1  # IronFunctions using Postgres
     2  
     3  Let's presuppose you don't have even a postgres DB ready.
     4  
     5  ### 1. Let's start a postgres instance:
     6  
     7  ```
     8  docker run --name iron-postgres \
     9          -e POSTGRES_PASSWORD=ironfunctions -d postgres
    10  ``` 
    11  
    12  ### 2. Now let's create a new database to IronFunctions
    13  
    14  Creating database:
    15  
    16  ```
    17  docker run -it --rm --link iron-postgres:postgres postgres \
    18      psql -h postgres -U postgres -c "CREATE DATABASE funcs;"
    19  ```
    20  
    21  Granting access to postgres user
    22  
    23  ```
    24  docker run -it --rm --link iron-postgres:postgres postgres \
    25      psql -h postgres -U postgres -c 'GRANT ALL PRIVILEGES ON DATABASE funcs TO postgres;'
    26  ```
    27  
    28  ### 3. Now let's start IronFunctions connecting to our new postgres instance
    29  
    30  ```
    31  docker run --rm --privileged --link "iron-postgres:postgres" \
    32      -e "DB_URL=postgres://postgres:ironfunctions@postgres/funcs?sslmode=disable" \
    33      -it -p 8080:8080 iron/functions
    34  ```