Skip to content

Commit 805ec20

Browse files
committed
Add docker-compose example and update docs
1 parent 43d85b7 commit 805ec20

File tree

2 files changed

+28
-2
lines changed

2 files changed

+28
-2
lines changed

docker-compose.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
version: '2'
2+
services:
3+
postgres:
4+
image: postgres:9.5-alpine
5+
restart: always
6+
volumes:
7+
- ~/stringer:/var/lib/postgresql/data
8+
environment:
9+
- POSTGRES_PASSWORD=super_secret_password
10+
- POSTGRES_USER=db_user
11+
- POSTGRES_DB=stringer
12+
13+
web:
14+
image: mdswanson/stringer
15+
depends_on:
16+
- postgres
17+
restart: always
18+
ports:
19+
- 80:8080
20+
environment:
21+
- SECRET_TOKEN=YOUR_SECRET_TOKEN
22+
- PORT=8080
23+
- DATABASE_URL=postgres://db_user:super_secret_password@postgres:5432/stringer

docs/docker.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ Visit `http://localhost:8080` and enjoy Stringer!
1313
**One caveat**: Stringer was not designed to be used with sqlite so you might run into some issues if you
1414
have Stringer fetch many feeds. See [this issue](https://github.com/swanson/stringer/issues/164) for details.
1515

16-
## Production ready setup
16+
## Production ready setup using docker-compose
17+
18+
Download [docker-compose.yml](../docker-compose.yml) and in the corresponding foler, run `docker-compose up -d`, give it a second and visit `localhost`
19+
20+
## Production ready manual setup
1721

1822
The following steps can be used to setup Stringer on Docker, using a Postgres database also running on Docker.
1923

@@ -115,4 +119,3 @@ server {
115119
}
116120
}
117121
```
118-

0 commit comments

Comments
 (0)