Hedgedoc

HedgeDoc HedgeDoc (formerly known as CodiMD) is an open-source, web-based, self-hosted, collaborative markdown editor. Needed a re-write of the docker-compose.yml as setup quite different to HomelabOS CodiMD - mainly setting up database environment correctly and using an ARM64 V8 version. Works nicely now but was a challenge to get working initially.

Shaarli

---
version: '3'

networks:
  traefik_network:
    external:
      name: homelabos_traefik
  hedgedoc:

services:
  database:
    image: postgres:alpine
    networks:
      - hedgedoc
    environment:
      - POSTGRES_USER=hedgedoc
      - POSTGRES_PASSWORD=<your_password>
      - POSTGRES_DB=hedgedoc
    volumes:
      - /var/homelabos/hedgedoc/database:/var/lib/postgresql/data
    restart: always
  hedgedoc:
    # Make sure to use the latest release from https://hedgedoc.org/latest-release
    image: linuxserver/hedgedoc:arm64v8-version-1.9.9
    environment:
      - CMD_DB_URL=postgres://hedgedoc:password@database:5432/hedgedoc
      - CMD_DOMAIN=hedgedoc.<yourdomain.com>
      - CMD_PROTOCOL_USESSL=true
      - CMD_URL_ADDPORT=false
      - NODE_ENV=production
      - CMD_ALLOW_ANONYMOUS=false
      - CMD_ALLOW_ANONYMOUS_EDITS=true
      - CMD_DEFAULT_PERMISSION=private
      - CMD_ALLOW_EMAIL_REGISTER=false 
      # set to true and then revert to flase if you don't want to allow open enrol
      - CMD_ALLOW_GRAVATAR=false
    volumes:
      - /var/homelabos/hedgedoc/uploads:/hedgedoc/public/uploads
    ports:
      - "3000:3000"
    restart: always
    depends_on:
      - database

    networks:
      - traefik_network
      - hedgedoc

    labels:
      - "traefik.http.services.hedgedoc.loadbalancer.server.scheme=http"
      - "traefik.http.services.hedgedoc.loadbalancer.server.port=3000"
      - "traefik.enable=true"
      - "traefik.docker.network=homelabos_traefik"
      - "traefik.http.routers.hedgedoc-http.service=hedgedoc"
      - "traefik.http.routers.hedgedoc-http.rule=Host(`hedgedoc.<yourdomain.com>`)"
      - "traefik.http.routers.hedgedoc-http.entrypoints=http"
      - "traefik.http.routers.hedgedoc-http.middlewares=redirect@file, customFrameHomelab@file"
      - "traefik.http.routers.hedgedoc.service=hedgedoc"
      - "traefik.http.routers.hedgedoc.rule=Host(`hedgedoc.<yourdomain.com>`)"
      - "traefik.http.routers.hedgedoc.entrypoints=https"
      - "traefik.http.routers.hedgedoc.middlewares=customFrameHomelab@file"
      - "traefik.http.routers.hedgedoc.tls=true"
      - "traefik.http.routers.hedgedoc.tls.certresolver=http"