Tomo in production #286
-
Hi, I'm looking for best practice for using Tomo in a production environnement.
How do I use Tomo to delete all other folders except the currently used version?
I have two front end Rails server for load balancing, I would like to push a new version to both at the same time.
I have another serveur for Posgresql only. All other advice to secure the process of updating a production application is welcome. Thanks for Tomo ! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @francois0690 ! Good questions.
This happens automatically when the core:clean_releases task runs (it should be near the end of your set keep_releases: 1
Tomo is designed to deploy to multiple servers simultaneously. In your host "deployer@www1.example.com"
host "deployer@www2.example.com" Now you can run In practice, you will also want to use roles to avoid doubling-up on certain operations. For example, you probably only want database tasks like host "deployer@www1.example.com", roles: ["primary"]
host "deployer@www2.example.com"
role :primary, runs: ["rails:db_*", "rails:console", "rails:log_tail"]
Yes, there is no harm in removing the
As a general practice, I suggest writing your seeds so that they are idempotent. In my opinion, running |
Beta Was this translation helpful? Give feedback.
Hi @francois0690 ! Good questions.
This happens automatically when the core:clean_releases task runs (it should be near the end of your
deploy
block). By default, it will keep the most recent 10 release folders and delete the older ones. If you want to keep only 1 release, add this setting to your.tomo/config.rb
file:Tomo is designed to deploy to multiple servers simultaneously. In your
.tomo/config.rb
, add a host line for each server, like this:Now you can run
tomo setup
to set up …