أي إعدادات يمكن تكوينها دون إعادة بناء الحاوية؟

مرحباً

سؤال سريع حول إمكانية نشر صورة discourse نفسها على بيئات متعددة (مثل الاختبار التجريبي، والإصدار التجريبي، والإنتاج، وما إلى ذلك).

أود بناء صورة discourse مرة واحدة في خط أنابيب CI/CD الخاص بي، ودفع تلك الصورة إلى مستودع، وتشغيل نفس صورة discourse تماماً في جميع البيئات. أود أن تكون الاختلافات بين البيئات (مثل اسم المضيف وما إلى ذلك) ممثلة في متغيرات البيئة أو ملفات الإعدادات الخارجية للحاوية. مع discourse، تجربتي هي أنه ليس من الواضح تماماً أي الإعدادات مدمجة في الصورة وأيها آمن للإعداد عن طريق تغيير ملف YAML دون إعادة بناء.

هل توجد قائمة بالمتغيرات التي يمكن إعدادهآ بأمان في كل بيئة دون إعادة بناء الحاوية في مكان ما؟

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.