From 805ec2045f5e71ec3265c75d9a757ba4fe8931b0 Mon Sep 17 00:00:00 2001 From: Chris Lubomanski Date: Sun, 24 Sep 2017 01:39:40 +0200 Subject: [PATCH] Add docker-compose example and update docs --- docker-compose.yml | 23 +++++++++++++++++++++++ docs/docker.md | 7 +++++-- 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 000000000..06ac17b91 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,23 @@ +version: '2' +services: + postgres: + image: postgres:9.5-alpine + restart: always + volumes: + - ~/stringer:/var/lib/postgresql/data + environment: + - POSTGRES_PASSWORD=super_secret_password + - POSTGRES_USER=db_user + - POSTGRES_DB=stringer + + web: + image: mdswanson/stringer + depends_on: + - postgres + restart: always + ports: + - 80:8080 + environment: + - SECRET_TOKEN=YOUR_SECRET_TOKEN + - PORT=8080 + - DATABASE_URL=postgres://db_user:super_secret_password@postgres:5432/stringer diff --git a/docs/docker.md b/docs/docker.md index f0e150f89..606e51576 100644 --- a/docs/docker.md +++ b/docs/docker.md @@ -13,7 +13,11 @@ Visit `http://localhost:8080` and enjoy Stringer! **One caveat**: Stringer was not designed to be used with sqlite so you might run into some issues if you have Stringer fetch many feeds. See [this issue](https://github.com/swanson/stringer/issues/164) for details. -## Production ready setup +## Production ready setup using docker-compose + +Download [docker-compose.yml](../docker-compose.yml) and in the corresponding foler, run `docker-compose up -d`, give it a second and visit `localhost` + +## Production ready manual setup The following steps can be used to setup Stringer on Docker, using a Postgres database also running on Docker. @@ -115,4 +119,3 @@ server { } } ``` -