Change server to a two-container setup

Hi,
I have two questions:

  • Wich domain name should I use when setting up a staging server to a local server?
  • Is it possibile to install the staging server with 2 containers mode and restore data automatically from s3?
    Thank you

Yes.

Whatever domain the staging server has? I don’t understand the question. A local (development) server is on localhost and has no domain.

Let’s explain better.

I want to migrate my single container forum to a new server with more ram, disk and cpu, switching to a 2 containes installation to speed up updates.

Doing a fresh install on the new server, I got an error indicating my actual forum domain.
Maybe I made a mistake doing this discourse/docs/INSTALL-cloud.md at main · discourse/discourse · GitHub

The easiest is to run discourse-setup with the - - two-container switch and restore your backup there.

What error? When?

I think I missed the dns configuration.

1 Like

I’m wandering wich domain indicate installing staging server.
Staging server will not be public, so I thought to use my website domain without changing DNS.
I was wrong.

Any suggestions?

You have to use some domain that resolves to your server just like they error message says. It doesn’t matter what it is, but it has to be public and work.

2 Likes

Dns problem solved.

I’d like to turn off https for the staging server

No. You would not. Discourse doesn’t work without https and even if it did your staging site would then be different from your production site so it would not be a very good test.

I’m not totally sure if the topic was ever about stage server at this point, because

Then staged will be very different than production one.

1 Like

Well, if that’s the case then this should be in another topic.

@Saiano are you trying to have one server that you’re changing to a 2-container setup or do you want what the OP is about and have a second server to use to test upgrades before deploying them to the production server?

I have one server with one container installation.
I need to change hosting and test updates / bew feature before releasing in production installation.
So i decided to

build a local instance with two container.
Test the migration. (Online server —> local staging)

Then I’ll buy a new server.
Migrate my discourse to new hosting
And keep local staging server to test.

Sorry if I made too many questions.

The problem is that the local server will be an entirely different development installation, which will be different from a production deployment.

I recommend that you start at the “buy a new server” step, or make your “local server” be a VM with at least 2GB of RAM. You can follow Move a Discourse site to another VPS with rsync with some modifications to set up the new server with the cert from the existing server and then do local DNS changes to point to it.

OR you can just set up the test server on a new temporary test subdomain and skip the fancy DNS stuff. And if you do it this way and just have them share S3 backup config set in the yml files, then you can restore the database from the existing site to the new one directly from the s3 bucket.

I’ll try this way. I already have backups on s3.
Maybe I use test.mydomain.com then restore and change domain name to the original one?

It’ll be easier to change the new server domain name and then restore the backup again. That will handle all of the hostname mapping stuff.

Trying doing this, I have problems changing the domain name. The site was not accessible.

If you tried to get a certificate several times, say by rebuilding when dns wasn’t right then you may be rate limited. If that’s the case you can wait a week or add another hostname like

Set up Let’s Encrypt with multiple domains / redirects

1 Like

I moved the letsencrypt folder from the old site to the new one and it works.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.