diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4c49bd7 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.env diff --git a/services/thelounge/add-user.sh b/services/thelounge/add-user.sh new file mode 100644 index 0000000..0d9775f --- /dev/null +++ b/services/thelounge/add-user.sh @@ -0,0 +1,2 @@ +#!/bin/sh +docker exec --user node -it thelounge thelounge add unclesamulus diff --git a/services/thelounge/docker-compose.yml b/services/thelounge/docker-compose.yml new file mode 100644 index 0000000..1eaf9f7 --- /dev/null +++ b/services/thelounge/docker-compose.yml @@ -0,0 +1,10 @@ +version: '3' +services: + thelounge: + image: thelounge/thelounge:latest + container_name: thelounge + ports: + - "9000:9000" + restart: always + volumes: + - ~/.thelounge:/var/opt/thelounge # bind lounge config from the host's file system \ No newline at end of file diff --git a/services/thelounge/nginx.conf b/services/thelounge/nginx.conf new file mode 100644 index 0000000..e9878b8 --- /dev/null +++ b/services/thelounge/nginx.conf @@ -0,0 +1,57 @@ +# nginx reverse proxy for nextthelounge + +server { + server_name thelounge.s1gm4.eu; + listen 80; + listen [::]:80; + + # Redirect to https + location / { + redirect 302 https://$server_name$request_uri; + } + + # For dehydrated ssl certification + location /.well-known/acme-challenge { + alias /var/www/dehydrated/acme-challenges; + } +} + +server { + # SSL configuration + # + listen 443 ssl; + listen [::]:443 ssl; + # + + ssl_certificate /var/www/dehydrated/certs/thelounge.s1gm4.eu/fullchain.pem; + ssl_certificate_key /var/www/dehydrated/certs/thelounge.s1gm4.eu/privkey.pem; + + # Add index.php to the list if you are using PHP + index index.html index.htm index.php; + + server_name thelounge.s1gm4.eu; + + # deny access to .htaccess files, if Apache's document root + # concurs with nginx's one + # + location ~ /\.ht { + deny all; + } + # For dehydrated ssl certification + location /.well-known/acme-challenge { + alias /var/www/dehydrated/acme-challenges; + } + + location / { + proxy_pass http://localhost:9000/; + proxy_http_version 1.1; + proxy_set_header Connection "upgrade"; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header X-Forwarded-For $remote_addr; + proxy_set_header X-Forwarded-Proto $scheme; + + # by default nginx times out connections in one minute + proxy_read_timeout 1d; + } + +} \ No newline at end of file