我正在为我的 Rails/Postgres 应用程序使用 Docker 和 Fig。
将 Rails 应用程序更新推送到生产环境的最佳方式是什么?目前我正在生产中运行以下脚本,但它会导致大约 10 秒的停机时间:
sudo fig pull web
sudo fig up -d web
我猜当 Fig 重新创建web
容器时会发生停机。
这是fig.xml
我在生产中使用的文件。
db:
image: postgres:9.3
volumes_from:
- db-data
ports:
- 5432
web:
image: myaccount/my_private_repo
command: bundle exec unicorn -p 3000 -c ./config/unicorn.rb
volumes_from:
- gems-2.1
ports:
- "80:3000"
links:
- db
该应用程序的演示在这里:https ://github.com/evgenyneu/docker-rails-fig-sample