Multiple container setup problems

Hi all! After trying to figure out multisite setup but failing miserably, I ended up doing three separate containers, one for my current forum and two for the archive forums. I went with socketed, managed to get NGINX working and I even have Let’s Encrypt per these guidelines.

I gave the archive forums one unicorn, the current only one, but I’m running into a thought: can I really be doing this out of the box like this? Are all containers running redis & sidekiq in a way that messes it up royally? Or should I somehow link the two archive containers to the first one and so on? Because now after restore I’m getting this message:

Oops
The software powering this discussion forum encountered an unexpected problem. We apologize for the inconvenience.

Detailed information about the error was logged, and an automatic notification generated. We’ll take a look at it.

No further action is necessary. However, if the error condition persists, you can provide additional detail, including steps to reproduce the error, by posting a discussion topic in the site’s feedback category.

I understood from the multisite topic that there should be two separate containers when doing multisite, but I never quite understood what is meant by data and web containers. Does this mean that data containers is the only one using sql and web redies & sidekiq or what?

I’m a quick learner and a bit learned when it comes to this stuff, but can’t really say I’m a sysadmin.

The recommendation is that you have one container with redis and Postgres and a second with the web server. If you have two web containers then you’ll need to have another external nginx reverse proxying to the web containers. It’ll be easier to have a single multisite server.

2 Likes

I have this in /etc/nginx/sites-available/default:

server {

        server_name www.uskojarukous.fi uskojarukous.fi nyforum.uskojarukous.fi;

        location /errorpages/ {
                alias /var/www/errorpages/;
        }

        location / {
                proxy_pass http://unix:/var/discourse/shared/nyforum/nginx.http.sock:;
                proxy_set_header Host $http_host;
                proxy_http_version 1.1;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_set_header X-Real-IP $remote_addr;
                error_page 502 =502 /errorpages/offline.html;
        }

    listen [::]:443 ssl ipv6only=on; # managed by Certbot
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/uskojarukous.fi/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/uskojarukous.fi/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot



}

server {

        server_name urforum.uskojarukous.fi;

        location /errorpages/ {
                alias /var/www/errorpages/;
        }

        location / {
                proxy_pass http://unix:/var/discourse/shared/urforum/nginx.http.sock:;
                proxy_set_header Host $http_host;
                proxy_http_version 1.1;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_set_header X-Real-IP $remote_addr;
                error_page 502 =502 /errorpages/offline.html;
        }

    listen [::]:443 ssl; # managed by Certbot
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/uskojarukous.fi/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/uskojarukous.fi/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}

server {

        server_name ueforum.uskojarukous.fi;

        location /errorpages/ {
                alias /var/www/errorpages/;
        }

        location / {
                proxy_pass http://unix:/var/discourse/shared/ueforum/nginx.http.sock:;
                proxy_set_header Host $http_host;
                proxy_http_version 1.1;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_set_header X-Real-IP $remote_addr;
                error_page 502 =502 /errorpages/offline.html;
        }

    listen [::]:443 ssl; # managed by Certbot
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/uskojarukous.fi/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/uskojarukous.fi/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}

server {
    if ($host = www.uskojarukous.fi) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    if ($host = nyforum.uskojarukous.fi) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    if ($host = uskojarukous.fi) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


        listen  80;
        listen  [::]:80;

        server_name www.uskojarukous.fi uskojarukous.fi nyforum.uskojarukous.fi;
    return 404; # managed by Certbot






}

server {
    if ($host = ueforum.uskojarukous.fi) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


        listen  80;
        listen  [::]:80;

        server_name ueforum.uskojarukous.fi;
    return 404; # managed by Certbot


}

server {
    if ($host = urforum.uskojarukous.fi) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


        listen  80;
        listen  [::]:80;

        server_name urforum.uskojarukous.fi;
    return 404; # managed by Certbot


}

At least two of the forums work all right…