Currently I have pretty standard env: nginx + web(Rails) + worker(Sidekiq) + Postgres + Redis + Data Containers(File storage and DB storage).
The deploy process looks pretty straightforward: - update source code; - rebuild container(s); - run migrations; - stop old and launch new containers;
For web
(rails) and data
(pg) containers it would be something like this:
docker-compose build && docker-compose run web rake db:migrate && docker-compose up -d
.
Are there any best practices and is this solution compatible with them? Capistrano uses releases approach (with ability to rollback) - is this approach applicable with Docker? Is it even possible to use Docker and Capistrano?
Please share your solutions or links to success stories.
Thanks!