3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Railsでenviromentの追加

Posted at

Railsでstaging環境を追加した時のメモ。

1. database.ymlの設定

productionをコピーして、キーをstagingに変更

2. secrets.ymlの設定

productionをコピーして、キーをstagingに変更。シークレットキーを環境変数から取得する部分は同じ。

3. 自前で追加したモジュールのymlの設定

自分たちの環境では、elasticsearch.yml, redis.ymlを修正。

4. staging.rbの作成

config/environments/production.rbをコピーしてstaging.rbを作成。
基本はproduction.rbと同じ構成。action_mailerの設定がここにあるので、staging環境に合わせて変更。

6. thin.yml

Railsアプリケーションはthinで起動しているので、thinの設定ファイルを修正。

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?