---
version: "3.7"

services:
  murmur:
    image: sudoforge/mumble-server
    container_name: murmur
    depends_on: 
      - swag
    restart: unless-stopped
    ports:
      - 64738:64738/tcp
      - 64738:64738/udp
    environment:
      - MUMBLE_REGISTERNAME=Pepito
      - SUPERUSER_PASSWORD=hc0hseUh
      - MUMBLE_ENABLESSL=1
      - MUMBLE_BANDWIDTH=128000
    volumes:
      - ./mumble_data:/data
      - ./swag-config/etc/letsencrypt/live/pepitosgate.duckdns.org/fullchain.pem:/data/cert.pem
      - ./swag-config/etc/letsencrypt/live/pepitosgate.duckdns.org/privkey.pem:/data/key.pem
  duckdns:
    image: linuxserver/duckdns
    container_name: duckdns
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
      - SUBDOMAINS=pepitosgate.duckdns.org
      - TOKEN=46bc1662-d01d-4f4f-8e3c-fdf57ff85261
      - LOG_FILE=true
    volumes:
      - ./duckdns-config:/config
    restart: unless-stopped

  swag:
    image: linuxserver/swag
    container_name: swag
    cap_add:
      - NET_ADMIN
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
      - URL=pepitosgate.duckdns.org
      - SUBDOMAINS=
      - VALIDATION=duckdns
      - DUCKDNSTOKEN=46bc1662-d01d-4f4f-8e3c-fdf57ff85261
      - EMAIL=athaliar.ch@gmail.com
#      - DHLEVEL=2048 #optional
      - ONLY_SUBDOMAINS=false #optional
    volumes:
      - ./swag-config:/config
    ports:
      - 443:443
      - 80:80 #optional
    restart: unless-stopped

  teamspeak:
    image: teamspeak
    restart: unless-stopped
    ports:
      - 9987:9987/udp
      - 10011:10011
      - 30033:30033
    environment:
      TS3SERVER_DB_PLUGIN: ts3db_mariadb
      TS3SERVER_DB_SQLCREATEPATH: create_mariadb
      TS3SERVER_DB_HOST: db
      TS3SERVER_DB_USER: ts3server
      TS3SERVER_DB_PASSWORD: hc0hseUh
      TS3SERVER_DB_NAME: teamspeak
      TS3SERVER_DB_WAITUNTILREADY: 30
      TS3SERVER_LICENSE: accept
      TS3SERVER_SERVERADMIN_PASSWORD: hc0hseUh
    volumes:
      - ./teamspeak/server:/var/ts3server
    depends_on:
      - db
  db:
    image: mariadb
    restart: unless-stopped
    environment:
      MYSQL_USER: ts3server
      MYSQL_PASSWORD: hc0hseUh
      MYSQL_DATABASE: teamspeak
      MYSQL_ROOT_PASSWORD: hc0hseUh
    volumes:
      - ./teamspeak/database:/var/lib/mysql

  ddclient:
    image: linuxserver/ddclient
    container_name: ddclient
    volumes:
      - data/ddclient:/config
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Europe/London
    restart: unless-stopped