I want to deploy my rails project using Docker. So I use Docker-Compose. But I get one weird error message. When run docker-compose up(this contains db-container with postgresql
For ones, who have problem when there is no tmp/pids/server.pid actually exists:
(Docker version 1.11.2, build b9f10c9)
Solution, which worked for me is to add exact command to docker-compose.yml, for example:
command:
rails s -b0
Having this command, which in fact may simply duplicate Dockerfile's CMD - issue with stale .pid do not appear.
Other option, when you need to use Dockerfile's CMD, is to run with option --build to rebuild image:
docker-compose up --build
Though it takes time, so first solution is more convenient