...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:

He certainly seemed to know what he was doing, but whether to spend 45 minutes to life finding out another story. 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… this man’s epic err… odyssey. I’ll tell you why I’m a tad irked here - it would appear he would not let me comment my offer of aid to others, it would appear, and that made me perturbed. My comments, below, containing our list of commands was deleted while my other comments were not. So, I decided to make my own … supplement… to the video…

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

./discourse-setup

./launcher rebuild app

sudo certbot --nginx

certbot certonly

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

sudo service nginx reload
systemctl restart nginx

reboot

docker ps

systemctl status nginx.service

Some (supplemental) resources:
https://meta.discourse.org/t/run-other-websites-on-the-same-machine-as-discourse/17247
https://meta.discourse.org/t/installing-on-kubernetes/49329/23
https://nginx.org/en/linux_packages.html
Multisite configuration with Docker - sysadmin - Discourse Meta