Skip to content

Commit 8cd5252

Browse files
Norman Kämper-Leymannbermudezmt
Norman Kämper-Leymann
authored andcommitted
Update rails.md
It occupied me quite a while figuring out why this sample didn't have a restart policy. And why we where supposed to always properly stop the containers wheres you normally would simply hit `Ctrl+C`. Turned out that this `pid` issue is a rails-specific issue. docker/compose#1393 (comment) And of course there's already [a Gem for fixing that](https://github.com/lorenzosinisi/shutup) but having the one-liner in the `docker-compose.yml` keeps the logic where it belongs to (and now also is treated here in the sample).
1 parent 2176ab0 commit 8cd5252

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compose/rails.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ to link them together and expose the web app's port.
4747
services:
4848
db:
4949
image: postgres
50+
restart: always
5051
volumes:
5152
- ./tmp/db:/var/lib/postgresql/data
5253
web:
@@ -219,7 +220,7 @@ Removing network rails_default
219220
```
220221

221222
You can also stop the application with `Ctrl-C` in the same shell in which you
222-
executed the `docker-compose up`. If you stop the app this way, and attempt to
223+
executed `docker-compose up`. If you stop the app this way, and attempt to
223224
restart it, you might get the following error:
224225

225226
```none

0 commit comments

Comments
 (0)