How do I tomo deploy for production vs staging? #292
-
Hi, I'm currently using tomo to deploy local to production. What is the best way to have my local to deploy to production or staging? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, thanks for using tomo! Good question. Production and staging would be considered "environments" in tomo terminology. The default https://tomo-deploy.com/configuration/#environmentname-block So in your case you would define an environment called "production" and move your existing environment :production do
host "app.example.com"
end And then you can add a second environment named "staging" with a environment :staging do
host "app-staging.example.com"
end Now, when you setup or deploy, you can specify the environment with
Or if you omit You may also have different environment variable values per environment. As mentioned in the docs, you can declare those using I am using tomo to deploy an app that has staging and production environments, so if you have any more specific questions, let me know. Hope that helps! |
Beta Was this translation helpful? Give feedback.
Hi, thanks for using tomo! Good question. Production and staging would be considered "environments" in tomo terminology. The default
.tomo/config.rb
does not have multiple environments, but you can easily add them. There is a small bit of documentation here:https://tomo-deploy.com/configuration/#environmentname-block
So in your case you would define an environment called "production" and move your existing
host
entry/entries into it, like this:And then you can add a second environment named "staging" with a
host
entry that points to your staging server:Now, when you setu…