こんにちは
Discourse イメージを複数の環境(ステージング、ベータ、本番など)にデプロイする可能性について、簡単な質問があります。
CI/CD パイプラインで一度 Discourse イメージをビルドし、それをリポジトリにプッシュして、すべての環境で完全に同じ Discourse イメージを実行したいと考えています。環境間の違い(ホスト名など)は、コンテナ外部の環境変数または設定ファイルで表現したいです。Discourse の場合、どの設定がイメージに組み込まれていて、どの設定が再ビルドなしで YAML を変更して安全に設定できるのかが必ずしも明確ではないという経験があります。
コンテナの再ビルドなしに各環境で安全に設定できる変数のリストはどこかにありますか?
pfaffman
(Jay Pfaffman)
2019 年 4 月 29 日午後 5:52
2
Welcome, @russellwstanley . There has been lots of discussion of people who want to be able to have a docker_compose file that solves all their problems, but it’s not quite that simple. There has been much discussion about this (that I can’t find in 30 seconds).
To see what settings you can pass to the container you can look at discourse/config/discourse.config.sample at main · discourse/discourse · GitHub and discourse/config/site_settings.yml at main · discourse/discourse · GitHub to see what can be configured with environment variables.
But some things need to be done with things like
rake db:migrate
rake assets:precompile
so even if you get an image that has all the right stuff, it’s not quite as simple as just cranking it up.
Thanks so much for your quick reply @pfaffman . I’ll take a look at those settings and see if I can make something work.