version: "3"
services:
  mariadb:
    image: lscr.io/linuxserver/mariadb:latest
    container_name: hedgedoc_mariadb
    restart: always
    volumes:
      - /gurulandia/data/docker/hedgedoc/db:/config
    environment:
      - MYSQL_ROOT_PASSWORD=SuperPassword
      - MYSQL_DATABASE=hedgedoc
      - MYSQL_USER=hedgedoc
      - MYSQL_PASSWORD=hedgedoc
      - PGID=1000
      - PUID=1000
      - TZ=Europe/Helsinki
  adminer:
    image: adminer:latest
    container_name: adminer
    environment:
      ADMINER_DEFAULT_SERVER: mariadb
    restart: always
    ports:
      - 7777:8080
  hedgedoc:
    image: lscr.io/linuxserver/hedgedoc:latest
    container_name: hedgedoc
    restart: always
    depends_on:
      - mariadb
    volumes:
      - /gurulandia/data/docker/hedgedoc/config:/config
    environment:
      - DB_HOST=mariadb
      - DB_USER=hedgedoc
      - DB_PASS=hedgedoc
      - DB_NAME=hedgedoc
      - DB_PORT=3306
      - PGID=1000
      - PUID=1000
      - TZ=Europe/Helsinki
      - CMD_DOMAIN=gl-v-l-srv-04.local.gurulandia.eu
      - CMD_URL_ADDPORT=true #optional
      - CMD_PROTOCOL_USESSL=false #optional
      - CMD_PORT=3000 #optional
    ports:
      - 53000:3000