أحجام مشتركة في App.yml لإعداد موقعين

أود تعديل ملف app.yml الخاص بي لكي أستطيع تشغيل منصة Discourse أخرى (حاوية منفصلة، قاعدة بيانات منفصلة، وكل شيء يمكن تخيله منفصلًا! - من أجل قابلية النقل) على نفس الجهاز (الذي يعمل خلف nginx).

إذن، إعداداتي الأولى تبدو كالتالي (الأجزاء المهمة):

## app.yml للموقع01
volumes:
  - volume:
      host: /var/discourse_site01/shared/standalone
      guest: /shared
  - volume:
      host: /var/discourse_site02/shared/standalone/log/var-log
      guest: /var/log

.. وهذا يعمل بشكل ممتاز - النسخة متصلة بالإنترنت وكل شيء على ما يرام. الآن، أود استضافة منصة Discourse أخرى، وقد قمت بتجهيز الأحجام المشتركة لها كالتالي في ملف app.yml آخر:

## app.yml للموقع02
volumes:
  - volume:
      host: /var/discourse_site02/shared/standalone
      guest: /shared
  - volume:
      host: /var/discourse_site02/shared/standalone/log/var-log
      guest: /var/log

في هذا الإعداد الثاني، هل هناك أي نقاط يجب الانتباه إليها؟ أنا أشغله على جهاز إنتاجي، لذا أردت التأكد من أن ملف app.yml هذا صحيح.

I would strongly recommend testing this on a clone or staging copy beforehand, never directly on a live server.

Can you elaborate on the use of nginx? Are there other production services on the same machine?

@Stephen: the nginx is simply a reverse proxy to the 1st discourse instance. Nothing complicated. Infact, the set up is the one I followed on meta.discourse to set up nginx as the front facing server.

There are NO other services running on the machine. Infact, because it is a production machine, I set everything up in a completely seerate host folder discourse_site02. Does this make sense?

Do you see any problems with the app.yml I have described? or do you think something is wrong with my config?

Is there any reason you aren’t using a two-container multisite installation then? I don’t think you lose much portability here, the quickest way to move instances between servers is by migrating a backup.

In the event you needed to move an instance you would just bring up a new server, mark the old instance as read-only, repoint DNS and restore the backup. With a low-TTL service such as Cloudflare handling DNS a small site can be migrated in minutes. Users would experience a brief period of read-only access, no content would be lost.

It’s much more efficient to divide up resources in this way, you won’t end up running two database servers and two webservers in separate containers and totally negates the need for the nginx reverse proxy.

@Stephen: yes, I have seen the link you have shown, but for simplicity of setup (small team here with not much experience), I would like to do it the way I have described which ends up with two DBs and two webservers etc. Infact this is exactly the set up I prefer.

Other than the inefficiencies you have pointed out, is there any other gotchas on this?
Are the two app.yml files I shown correct?

Thank you for your time and the awesome software :smile:

best

@Stephen: just wondering, do you think my config looks correct for the 2 container setup?

As I said, I am not looking to save resources or be efficient :slight_smile: just want to know if it is OK to run this way assuming there are no gotchas to catch me out later.