Go to file
2024-01-10 18:03:51 +01:00
.gitignore first commit 2024-01-07 23:13:15 +01:00
README.install README.install: complete install iunstructions. 2024-01-10 18:03:51 +01:00

# --------------------
# Install discourse
# --------------------

# see also:
#  https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md

# Before you start
#
#     1.  Preparing your domain name
#     2.  Setting up email

# Installation
#
#     3.  Create new cloud server
#     4.  Access new cloud server
#     5.  Install Prerequisites for Docker
#     6.  Install Discourse
#     7.  Edit Discourse configuration
#     8.  Start Discourse
#     9.  Register new account and become admin
#     10. Post-install maintenance
#     11. (Optional) Add more Discourse features


# ...


# ---
# 5. Install Prerequisites for Docker
# ---

# Set up and install Docker Engine from Docker's apt repository.
#
# see also:
#    https://docs.docker.com/engine/install/debian/
#
# Add Docker's official GPG key:
#
apt-get install ca-certificates curl gnupg
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
chmod a+r /etc/apt/keyrings/docker.gpg


# Add the repository to Apt sources:
#
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  tee /etc/apt/sources.list.d/docker.list > /dev/null
apt-get update


# Install the (latest) Docker packages.
#
# apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
#
apt install docker-ce


# ----------
#
# Install a specific version of Docker Engine
#
# Start by listing the available versions in the repository:
#
#     # List the available versions:
#     $ apt-cache madison docker-ce | awk '{ print $3 }'
#
#     5:24.0.0-1~debian.11~bullseye
#     5:23.0.6-1~debian.11~bullseye
#     ...
#
# Select the desired version and install:
#
#     $ ERSION_STRING=5:24.0.0-1~debian.12~bookworm
#     # apt-get install docker-ce=$VERSION_STRING docker-ce-cli=$VERSION_STRING containerd.io docker-buildx-plugin docker-compose-plugin
#
# ----------




# ---
# 6. Install Discourse
# ---

DC_HOST="discourse.buendnis-pbf.de"

SMTP_HOST="mail.oopen."
SMPT_PORT=465
SMTP_USER="discourse@opferperspektive.de"
SMTP_PASS="Ha4xee-Zae2+pae"

LETS_ENCRYPT_EMAIL_ACCOUNT="ckubu-adm@oopen.de"


# In order to check the connection to discourse.buendnis-pbf.de:443 we 
# need to open a socket using netcat.
#
apt install netcat-openbsd


# Clone the Official Discourse Docker Image into /var/discourse.
#
git clone https://github.com/discourse/discourse_docker.git /var/discourse

cd /var/discourse
chmod 700 containers



# ---
# 7. Edit Discourse Configuration
# ---

cd /var/discourse


# Answer the following questions when prompted:
#
#   Hostname for your Discourse? [discourse.example.com]:                     discourse.buendnis-pbf.de
#   Email address for admin account(s)? [me@example.com,you@example.com]:     discourse@opferperspektive.de
#   SMTP server address? [smtp.example.com]:                                  mail.oopen.de
#   SMTP port? [587]:                                                         465
#   SMTP user name? [user@example.com]:                                       discourse@opferperspektive.de
#   SMTP password? [pa$$word]:                                                Ha4xee-Zae2+pae
#   Let's Encrypt account email? (ENTER to skip) [me@example.com]:            ckubu-adm@oopen.de
#   Optional Maxmind License key () [xxxxxxxxxxxxxxxx]:                       -- NOT SET --
#
./discourse-setup



# ---
# 9. Register New Account and Become Admin
# ---

Email:         discourse@opferperspektive.de
Username:      admin
Password:      T5-sC.IYGd/PrX3z