Skip to content

Commit 211fe17

Browse files
authored
Create Stringer Network (#1084)
1 parent 21206e7 commit 211fe17

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Stringer is a Ruby app based on Rails, PostgreSQL, Backbone.js and GoodJob.
2424
Stringer will run just fine on the Eco/Basic Heroku plans.
2525

2626
Instructions are provided for deploying to [Heroku manually](/docs/Heroku.md), to any Ruby
27-
compatible [Linux-based VPS](/docs/VPS.md), to [Docker](docs/docker.md) and to [OpenShift](/docs/OpenShift.md).
27+
compatible [Linux-based VPS](/docs/VPS.md), to [Docker](docs/Docker.md) and to [OpenShift](/docs/OpenShift.md).
2828

2929
## Niceties
3030

docker-compose.yml

+10
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
version: '2'
2+
23
services:
34
postgres:
45
image: postgres:9.5-alpine
56
restart: always
7+
networks:
8+
- stringer-network
69
volumes:
710
- ~/stringer:/var/lib/postgresql/data
811
environment:
@@ -18,10 +21,17 @@ services:
1821
restart: always
1922
ports:
2023
- 80:8080
24+
networks:
25+
- stringer-network
2126
environment:
2227
- SECRET_KEY_BASE=<your configuration>
2328
- ENCRYPTION_PRIMARY_KEY=<your configuration>
2429
- ENCRYPTION_DETERMINISTIC_KEY=<your configuration>
2530
- ENCRYPTION_KEY_DERIVATION_SALT=<your configuration>
2631
- PORT=8080
2732
- DATABASE_URL=postgres://db_user:super_secret_password@postgres:5432/stringer
33+
34+
networks:
35+
stringer-network:
36+
external: false
37+
name: stringer-network

docs/docker.md renamed to docs/Docker.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ The following steps can be used to setup Stringer on Docker, using a Postgres da
1010

1111
1. Setup a Docker network so the two containers we're going to create can communicate:
1212

13-
```Sh
14-
docker network create --driver bridge stringer
15-
```
13+
```Sh
14+
docker network create --driver bridge stringer-network
15+
```
1616

1717
2. Setup a Postgres Docker container:
1818

@@ -21,7 +21,7 @@ docker run --detach \
2121
--name stringer-postgres \
2222
--restart always \
2323
--volume /srv/stringer/data:/var/lib/postgresql/data \
24-
--net stringer \
24+
--net stringer-network \
2525
-e POSTGRES_PASSWORD=myPassword \
2626
-e POSTGRES_DB=stringer \
2727
postgres:9.5-alpine
@@ -32,7 +32,7 @@ docker run --detach \
3232
```sh
3333
docker run --detach \
3434
--name stringer \
35-
--net stringer \
35+
--net stringer-network \
3636
--restart always \
3737
-e PORT=8080 \
3838
-e DATABASE_URL=postgres://postgres:myPassword@stringer-postgres/stringer \

0 commit comments

Comments
 (0)