Setup a OpenSlides 3.3 instance on Debian10 with https nginx reverse proxy and LetsEncrypt Cert:
apt update
apt install htop
apt install fail2ban
sudo apt install apt-transport-https ca-certificates curl gnupg
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
apt install docker-ce docker-ce-cli containerd.io
apt install nginx
Configure nginx:
nano /etc/nginx/sites-enabled/default
server {
server_name openslides.domainname.de os.domainname.de;
location /ws {
proxy_pass http://localhost:8000/ws;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
location /apps {
proxy_pass http://localhost:8000;
}
location /media {
proxy_pass http://localhost:8000;
}
location /rest {
proxy_pass http://localhost:8000;
}
location / {
proxy_pass http://localhost:8000;
}
}
Certbot / LetsEncrypt: enter link description here
apt install snapd
snap install core; sudo snap refresh core
apt remove certbot
snap install --classic certbot
ln -s /snap/bin/certbot /usr/bin/certbot
Get Cert:
certbot --nginx
Quelle: https://github.com/OpenSlides/OpenSlides/tree/3.3
git clone --branch 3.3 https://github.com/OpenSlides/OpenSlides.git --recurse-submodules
cd OpenSlides/docker/
./build.sh all
printf "DJANGO_SECRET_KEY='%s'\n" "$(tr -dc 'a-zA-Z0-9' < /dev/urandom | head -c 64)" > secrets/django.env
cp secrets/adminsecret.env.example secrets/adminsecret.env
nano secrets/adminsecret.env
EXTERNAL_HTTP_PORT=8000 m4 docker-compose.yml.m4 > docker-compose.yml
docker-compose up -d
docker-compose logs
There are a bunch of configuration possible:
nano docker-compose.yml
- DEFAULT_FROM_EMAIL:
- EMAIL_HOST:
- EMAIL_HOST_PASSWORD:
- EMAIL_HOST_USER: ""
- EMAIL_PORT: 587
- EMAIL_USE_SSL: ""
- EMAIL_USE_TLS: "True" EMAIL_USE_TLS/EMAIL_USE_SSL are mutually exclusive, so only set one of those settings to True.
- ENABLE_ELECTRONIC_VOTING: "True"
- INSTANCE_DOMAIN: "https://domain.de"
tbd...