mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
More doc updates, explanation of serverless. (#228)
* More doc updates, explanation of serverless. * Moved howto directory to examples and some minor doc updates. * Added apps and routes docs. * Fixes for Carlos' comments. * Added bit about importing lambda functions.
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
# IronFunctions Configuration Options
|
||||
# IronFunctions Runtime Options
|
||||
|
||||
## Configuration
|
||||
|
||||
When starting IronFunctions, you can pass in the following configuration variables as environment variables. Use `-e VAR_NAME=VALUE` in
|
||||
docker run. For example:
|
||||
@@ -14,19 +16,19 @@ docker run -e VAR_NAME=VALUE ...
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DB</td>
|
||||
<td>The database URL to use in URL format. See Databases below for more information. Default: BoltDB in current working directory `bolt.db`.</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>The message queue to use in URL format. See Message Queues below for more information. Default: BoltDB in current working directory `queue.db`.</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>
|
||||
<td>API_URL</td>
|
||||
<td>The primary functions api URL to pull tasks from (the address is that of another running functions process).</td>
|
||||
<td>The primary IronFunctions API URL to that this instance will talk to. In a production environment, this would be your load balancer URL.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>PORT</td>
|
||||
<td>Default (8080), sets the port to run on.</td>
|
||||
<td>Sets the port to run on. Default: `8080`.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>NUM_ASYNC</td>
|
||||
@@ -34,6 +36,33 @@ docker run -e VAR_NAME=VALUE ...
|
||||
</tr>
|
||||
<tr>
|
||||
<td>LOG_LEVEL</td>
|
||||
<td>Set to `DEBUG` to enable debugging. Default is INFO.</td>
|
||||
<td>Set to `DEBUG` to enable debugging. Default: INFO.</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## Starting without Docker in Docker
|
||||
|
||||
The default way to run IronFunctions, as it is in the Quickstart guide, is to use docker-in-docker (dind). There are
|
||||
a couple reasons why we did it this way:
|
||||
|
||||
* It's clean. Once the container exits, there is nothing left behind including all the function images.
|
||||
* You can set resource restrictions for the entire IronFunctions instance. For instance, you can set `--memory` on
|
||||
the docker run command to set the max memory for the IronFunctions instance AND all of the functions it's running.
|
||||
|
||||
There are some reasons you may not want to use dind, such as using the image cache during testing or you're running
|
||||
[Windows](windows.md).
|
||||
|
||||
### Mount the Host Docker
|
||||
|
||||
One way is to mount the host Docker. Everything is essentially the same except you add a `-v` flag:
|
||||
|
||||
```sh
|
||||
docker run --rm --name functions -it -v /var/run/docker.sock:/var/run/docker.sock -v $PWD/data:/app/data -p 8080:8080 iron/functions
|
||||
```
|
||||
|
||||
### Run outside Docker
|
||||
|
||||
You can of course just run the binary directly, you'll just have to change how you set the environment variables above.
|
||||
|
||||
See [contributing doc](../CONTRIBUTING.md) for information on how to build and run.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user