Per Environment Configuration for s3_website
s3_website deploys website to S3. It supports config selection via --config-dir
CLI option, so you can have multiple s3_website.yml
config files located in their own folders.
my_project
└── config
├── development
│ └── s3_website.yml
├── production
│ └── s3_website.yml
└── staging
└── s3_website.yml
In addition, if you prefer one central configuration, you may use ERB (Embedded Ruby) to achieve that.
For example, use execution tags (<% %>
) of ERB:
<% if ENV['NODE_ENV'] == 'production' %>
s3_bucket: zzz.buzz
<% else %>
s3_bucket: test.zzz.buzz
<% end %>
or use expression tags (<%= %>
):
s3_bucket: <%= ENV['S3_BUCKET'] %>