Skip to content

Instantly share code, notes, and snippets.

@Snuupy
Created April 20, 2022 17:26
Show Gist options
  • Save Snuupy/0aa3126c7032c90f0841dc97f86da662 to your computer and use it in GitHub Desktop.
Save Snuupy/0aa3126c7032c90f0841dc97f86da662 to your computer and use it in GitHub Desktop.
thelounge w/ docker-swag
# docker-swag/docker-compose.yml
---
version: "3"
services:
swag:
image: ghcr.io/linuxserver/swag
container_name: swag
networks:
- swag
cap_add:
- NET_ADMIN
environment:
- PUID=1002
- PGID=1002
- TZ=America/Toronto
- URL=domain.tld
- SUBDOMAINS=wildcard #remove wildcard if you don't want a wildcard tls cert
- VALIDATION=dns
- CERTPROVIDER= #optional
- DNSPLUGIN=digitalocean #optional
- PROPAGATION= #optional
- DUCKDNSTOKEN= #optional
- EMAIL=email #optional
- ONLY_SUBDOMAINS=false #optional
- EXTRA_DOMAINS= #format: domain2.tld,*.domain2.tld,etc
- STAGING=true #optional #change to false when you're ready to deploy
- MAXMINDDB_LICENSE_KEY= #optional
volumes:
- /root/docker-swag/config:/config #change to your config dir
# - ./config:/config
ports:
- 443:443
- 80:80 #optional
restart: unless-stopped
networks:
swag:
name: swag
driver: bridge
# put your DO keys in: /root/docker-swag/config/dns-conf/digitalocean.ini
# docker-thelounge/docker-compose.yml
version: '3'
services:
thelounge:
image: thelounge/thelounge:4.3.1
container_name: thelounge
# ports:
# - "9000:9000"
restart: always
volumes:
- /mnt/block-storage/compressed/thelounge:/var/opt/thelounge #change to diff path if you prefer
networks:
- swag
networks:
swag:
external: true
# docker-swag/config/nginx/proxy-confs/thelounge.subdomain.conf
## Version 2021/05/18
# make sure that your dns has a cname set for thelounge
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name thelounge.*;
include /config/nginx/ssl.conf;
client_max_body_size 0;
# enable for ldap auth, fill in ldap details in ldap.conf
#include /config/nginx/ldap.conf;
# enable for Authelia
#include /config/nginx/authelia-server.conf;
location / {
# enable the next two lines for http auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;
# enable the next two lines for ldap auth
#auth_request /auth;
#error_page 401 =200 /ldaplogin;
# enable for Authelia
#include /config/nginx/authelia-location.conf;
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app thelounge;
set $upstream_port 9000;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment