...a Supplemental to 'How To Deploy Discourse Using Nginx As A Proxy And Install A Certificate'

So I was trying to follow along with this for some time:

I managed to replicate after much perturbation…in my soul. Any case, I don’t want you to go through what I went through, so let me try to… supplement…

Now I’m not going to say this is correct, nor efficient. But I will say that it attempts to reduce the amount of homework required to get a discourse going which shares its NGINX reverse proxy with other containers using sockets. This worked for me, but I will perhaps soon go through and get rid of unnecessary steps, perhaps not. Maybe someone else will. That’s the beauty of public discourse without the delete comment button!!!

nano /etc/apt/sources.list

sudo apt install docker.io

sudo apt install git

sudo -s

sudo git clone GitHub - discourse/discourse_docker: A Docker image for Discourse /var/discourse

cd /var/discourse

chmod 700 containers

sudo apt install docker.io containerd certbot

sudo apt install curl gnupg2 ca-certificates lsb-release debian-archive-keyring

curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null

gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg

echo “deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] \ Index of /packages/mainline/debian/ lsb_release -cs nginx” | sudo tee /etc/apt/sources.list.d/nginx.list

echo -e “Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n” | sudo tee /etc/apt/preferences.d/99nginx

sudo apt update

sudo apt install nginx

sudo nano /etc/apt/sources.list.d/nginx.list

apt search certbot

#apt install python3-certbot-nginx/unstable

apt install python3-certbot-nginx/oldstable

sudo git clone GitHub - discourse/discourse_docker: A Docker image for Discourse /var/discourse

cd /var/discourse

cp -a samples/standalone.yml containers/app.yml

nano containers/app.yml

cp -a containers/app.yml containers/rebuild.yml

./launcher app rebuild

sudo ./launcher start app

sudo apt install netcat


./launcher rebuild app

sudo certbot --nginx

certbot certonly

nano /etc/nginx/conf.d/default.conf

sudo service nginx reload
systemctl restart nginx


docker ps

systemctl status nginx.service

Some (supplemental) resources:
Multisite configuration with Docker - Self-Hosting - Discourse Meta