Files
fn-serverless/docs/operating/databases
Travis Reeder 5eb534f243 fix bug
2018-02-16 07:38:53 -08:00
..
2017-11-17 15:53:44 -08:00
2018-02-16 07:38:53 -08:00
2017-11-29 17:50:24 -08:00
2017-11-29 17:50:24 -08:00

Databases

We currently support the following databases and they are passed in via the FN_DB_URL environment variable. For example:

docker run -e "FN_DB_URL=postgres://user:pass@localhost:6212/mydb" ...

sqlite3 (default)

URL: sqlite3:///functions/data/functions.db

SQLite3 is an embedded database which stores to disk. If you want to use this, be sure you don't lose the data directory by mounting the directory on your host. eg: docker run -v $PWD/data:/functions/data -e FN_DB_URL=sqlite3:///functions/data/fn.db ...

PostgreSQL

URL: postgres://user123:pass456@ec2-117-21-174-214.compute-1.amazonaws.com:6212/db982398

Use a PostgreSQL database. If you're using Functions in production, you should probably start here.

More on PostgreSQL

MySQL

URL: mysql://user123:pass456@tcp(ec2-117-21-174-214.compute-1.amazonaws.com:3306)/funcs

More on MySQL

What about database X?

We're happy to add more and we love pull requests, so feel free to add one! Copy one of the implementations above as a starting point.