From c494bf051e253839f5000d59ad05c7d8ee60f6a6 Mon Sep 17 00:00:00 2001 From: Denis Makogon Date: Wed, 22 Mar 2017 23:56:39 +0200 Subject: [PATCH] Add MySQL docs (#602) Closes: #596 --- docs/operating/databases/README.md | 8 +++++++- docs/operating/databases/mysql.md | 20 ++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 docs/operating/databases/mysql.md diff --git a/docs/operating/databases/README.md b/docs/operating/databases/README.md index 05658415e..8b1f5d6c8 100644 --- a/docs/operating/databases/README.md +++ b/docs/operating/databases/README.md @@ -22,7 +22,13 @@ URL: `postgres://user123:pass456@ec2-117-21-174-214.compute-1.amazonaws.com:6212 Use a PostgreSQL database. If you're using IronFunctions in production, you should probably start here. -[More on Postgres](postgres.md) +[More on PostgreSQL](postgres.md) + +## [MySQL](https://www.mysql.com/) + +URL: `mysql://user123:pass456@tcp(ec2-117-21-174-214.compute-1.amazonaws.com:3306)/funcs` + +[More on MySQL](mysql.md) ## What about database X? diff --git a/docs/operating/databases/mysql.md b/docs/operating/databases/mysql.md new file mode 100644 index 000000000..c1501e2b5 --- /dev/null +++ b/docs/operating/databases/mysql.md @@ -0,0 +1,20 @@ +# IronFunctions using Postgres + +Let's presuppose you don't have even a MySQL DB ready. + +### 1. Let's start a MySQL instance: + +``` +docker run --name iron-mysql \ + -e MYSQL_DATABASE=funcs -e MYSQL_USER=iron -e MYSQL_PASSWORD=ironfunctions -d mysql +``` + +For more configuration options, see [docker mysql docs](https://hub.docker.com/_/mysql/). + +### 2. Now let's start IronFunctions connecting to our new mysql instance + +``` +docker run --rm --privileged --link "iron-mysql:mysql" \ + -e "DB_URL=mysql://iron:ironfunctions@tcp(mysql:3306)/funcs" \ + -it -p 8080:8080 iron/functions +```