1

My question is knowledge question, it is not for fixing a bug or a task, I see when we use capistrano to deploy application to server, capistrano do many action like, pre complile, migrate, restart puma... I confuse while capistrano is working, my website is still live because I see capistrano need restart puma. I think capistrano make a copy version of web and wait until deployment is finish and switch to new state.

This is a question interview I am asked. So please explain for me.

Bình Trương
  • 380
  • 1
  • 13

1 Answers1

1

From the official source

├── current -> /var/www/my_app_name/releases/20150120114500/
├── releases
│   ├── 20150080072500
│   ├── 20150090083000
│   ├── 20150100093500
│   ├── 20150110104000
│   └── 20150120114500
├── repo
│   └── <VCS related data>
├── revisions.log
└── shared
    └── <linked_files and linked_dirs>

current is a symlink pointing to the latest release. This symlink is updated at the end of a successful deployment. If the deployment fails in any step the current symlink still points to the old release.

releases holds all deployments in a timestamped folder. These folders are the target of the current symlink.

So there you have the reason for your site not going down during deployment, which would completely defeat the purpose of using such a nice tool as Capistrano.

Eyeslandic
  • 14,553
  • 13
  • 41
  • 54