Skip to content

Multiple production Rails credentials for multiple production servers #532

Answered by nickhammond
frenkel asked this question in Q&A
Discussion options

You must be logged in to vote

Got it, that's helpful and let me see if I can clear things up a bit. So you don't need to duplicate those 50 lines to each file, something like this should work:

deploy.yml - Your full deploy details, all 50+ lines.

service: blah
image: blah/awesome
env:
  clear:
    RAILS_ENV: production
  secret:
    - RAILS_MASTER_KEY

# The rest of your deploy setup, no need to setup servers in here.

deploy.production-1.yml - This is the entire file.

servers:
  - 123.0.0.1

.env.production-1

RAILS_MASTER_KEY=23489254ujiusadof

Deploying with:

kamal deploy -d production-1

Repeat for production-2, production-3, etc.

Replies: 1 comment 8 replies

Comment options

You must be logged in to vote
8 replies
@frenkel
Comment options

@nickhammond
Comment options

@frenkel
Comment options

@nickhammond
Comment options

Answer selected by frenkel
@frenkel
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants