我想使用Docker部署我的rails项目.所以我使用Docker-Compose.但我得到一个奇怪的错误消息.当运行docker-compose up(这包含带有postgresql的db-container,带有rails的redis和web容器)时,我得到一个
web_1 | => Booting Puma
web_1 | => Rails 4.2.4 application starting in production on http://0.0.0.0:3000
web_1 | => Runrails server -h for more startup options
web_1 | => Ctrl-C to shutdown server
web_1 | A server is already running. Check /usr/src/app/tmp/pids/server.pid.
web_1 | Exiting
所以我无法理解为什么我会收到这条消息,因为每次运行docker-compose时,新容器都会启动,而不是之前的容器.即使想要删除这些server.pid我也无法做到这一点,因为这个容器没有运行.
我的docker-compose.yml文件
web:
dockerfile: Dockerfile-rails
build: .
command: bundle exec rails s -p 3000 -b '0.0.0.0'
ports:
- "80:3000"
links:
- redis
- db
environment:
- REDISTOGO_URL=redis://user@redis:6379/
redis:
image: redis …Run Code Online (Sandbox Code Playgroud)