Thanks for getting it started, we will take it from here!
Is this still the good tutorial?
Or should follow
Right now both of those tutorials still leave me with questions :-/.
The 3 tutorials apply to 3 different situations, so pick the one that applies to what you want.
Running Discourse with a separate PostgreSQL server is for when you have an external PostgreSQL running somewhere else, like AWS RDS.
Multisite configuration with Docker is about running multiple Discourse instances inside the same container.
And this topic is about using different containers for data and web.
The three guides are for advanced users, and we recommend sticking to defaults for people who aren’t familiar with Discourse, containers and the whole sysadmin lingo.
well, what i want is to be able to host 3 discourse forums on my own VM.
From that i understand that i need to
- Separate the data and web containers (this also brings speedup when rebuilding the app)
- Configure 2 other discourse instances (somehow?) for my 2 other forums.
So this is why i don’t know exactly how to approach this situation.
You may want to do that (mainly to reduce rebuild times), but this is not required, and doesn’t really have anything to do with running multiple sites.
To run three sites, you can either bootstrap them separately (which is rather easy, but triples resource requirements), or use these instructions for setting up multisite:
I’m running a setup like this (i.e. multisite, but without separating data and web containers or any other fanciness), and this works fine, but setup is indeed a bit tricky.
I’m trying to implement the separate containers, but with a remote database. I’ve followed these instructions above and the howto for setting up a remote postgres DB. The setup works, but I’m wondering why there are two identical references (under web_only and data) to the same database. It makes me believe I’m doing something wrong and the web_only container is not even using the data container.
Am I doing this correctly?
Here is my setup.
Under the web_only.yml I added:
DISCOURSE_DB_SOCKET: '' DISCOURSE_DB_USERNAME: REMOVE DISCOURSE_DB_PASSWORD: REMOVE DISCOURSE_DB_HOST: xxx.ondigitalocean.com DISCOURSE_DB_NAME: REMOVE DISCOURSE_DB_PORT: 25060 DISCOURSE_DB_BACKUP_PORT: 25060 DISCOURSE_REDIS_HOST: data
I removed postgres.template.yml
templates: # - "templates/postgres.template.yml" - "templates/redis.template.yml"
I also added the following:
env: # ensure locale exists in container, you may need to install it LANG: en_US.UTF-8 DISCOURSE_DB_USERNAME: REMOVE DISCOURSE_DB_PASSWORD: REMOVE DISCOURSE_DB_HOST: REMOVE.ondigitalocean.com DISCOURSE_DB_NAME: REMOVE DISCOURSE_DB_PORT: 25060 DISCOURSE_DB_BACKUP_PORT: 25060
If you’re using a remote database, you don’t need to create the data container which has a database in it. Note that you need both postgres and redis (so you might need the data container for that).
but here i got only 1 container running without any error
I don’t know really what You understand by two containers but if You assume two containers mean two separate discourse instances then You’re looking in the wrong direction.
This article helps one set up a separate application and database container which is useful for advanced users looking for some flexibility.
If You want to install/host two discourse sites on the same machine, maybe look at discourse multisite:
Multisite configuration with Docker
what I mean by container is you can see two running container when you type over host machine
and sencond this 2container command i did not find where to set domain name
So which container was running? Assuming it was app then no, You’re running an old version of discourse-setup.
Do a git pull before proceeding to make sure you’re using the latest version of discourse-setup.
If You got data or web-only container running then You should check what caused the other one to not start. Usually, the web-only container fails to start because there is a process (web server) already running on port 80/443
oh no I git clone source code from github today.
I haven’t tried this personally but since @pfaffman is the genius who made this, maybe he can help with it.
Looking at the discourse-setup code on GitHub, I don’t see anything obvious that may cause it to not work.
What OS are you running your server on?
do server ubuntu
I have susscesfully run standlone container.
right now i am try this method Success - New Multisite Install on Dedicated server using ServerPilot, Nginx and Apache
Are you trying to achieve multisite or multi container?
benchmark as I said i run a stanlone forum for a month, when I want to a new one several ways have been dig
- I want to run separate standlone container on the same server ,no luck
- multisite docker different container for web and database as Multisite configuration with Docker, no luck
- your 2container no luck
- Success - New Multisite Install on Dedicated server using ServerPilot, Nginx and Apache this one is trying ,maybe it works
If You just want to run a 2nd standalone container, You will have to modify the yml files to use different directory and port. Possibly also disable the letsencrypt
after all these get fixed ,I want to write some turtorial for beginners
Just FYI, if You want to benchmark performance, You shouldn’t do that on a production machine. Rather spin up a separate VPS and use that for benchmarking.
Trying to run two separate instances of discourse on the same machine may lead you into a very broken install and that isn’t ideal.
That command will create separate data and web containers if and only if there is no app.yml when it is run. It will not create two web containers.