Rails server is still running in a new opened docker container

前端 未结 9 1332
面向向阳花
面向向阳花 2021-01-31 08:05

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

9条回答
  •  失恋的感觉
    2021-01-31 08:16

    If your solution is using rm to delete the pid file on an entry point, I think a better solution is to tell rails to write the pid file to an ephemeral path, like:

    web:
       command: bundle exec rails server -b '0.0.0.0' -p 3000 -P /tmp/rails.pid 
    

提交回复
热议问题