From 6c309d460bcd0b54815dca5f8c6dba7dfd4b51b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20L=C3=BCck?= Date: Sun, 9 Nov 2014 18:21:11 +0100 Subject: [PATCH] Explain database superuser --- README.md | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 97de8c3..2bfaf00 100644 --- a/README.md +++ b/README.md @@ -72,12 +72,16 @@ The recommended way to run this container is by linking it to a PostgreSQL datab You're free to pick (or build) any PostgreSQL container, as long as it exposes its database port (5432) to the outside. -Example: +Example with nornagon/postgres: ```bash $ docker run -d --name=tinydatabase nornagon/postgres:latest ``` +> The image nornagon/postgres exposes a database superuser that this image uses +to automatically create its user and database, +so you don't have to setup your database credentials here. + Use the following database options when running the container: ``` @@ -91,12 +95,15 @@ mysql container instead. You're free to pick (or build) any MySQL container, as long as it exposes its database port (3306) to the outside. -Example: +Example with sameersbn/mysql: ```bash -$ docker run -d --name=tinydatabase sameersbn/mysql:latest +$ docker run -d --name=tinydatabase -e DB_USER=ttrss -e DB_PASS=ttrss -e DB_NAME=ttrss sameersbn/mysql:latest ``` +> The image sameersbn/mysql does not expose a database superuser, +so you have to explicitly pass the database credentials here. + Use the following database options when running the container: ``` @@ -105,8 +112,7 @@ Use the following database options when running the container: #### External database server -If you already have a PostgreSQL or MySQL server around off docker you also can go with -that. +If you already have a PostgreSQL or MySQL server around off docker you also can go with that. Instead of linking docker containers you need to provide database hostname and port like so: ```