version: '3.7' # https://quay.io/repository/hedgedoc/hedgedoc # https://docs.hedgedoc.org/configuration/ networks: hedgedoc: services: hedgedoc: image: quay.io/hedgedoc/hedgedoc:alpine container_name: hedgedoc restart: "${RESTART:-no}" hostname: md domainname: ${BASE_DOMAIN} environment: - NODE_ENV=production - CMD_DB_DIALECT=postgres - CMD_DB_HOST=pg-hedgedoc - CMD_DB_PORT=5432 - CMD_DB_DATABASE=hedgedoc - CMD_DB_USERNAME=hedgedoc - CMD_DB_PASSWORD=${HEDGEDOC_PG_PWD:-password} - CMD_DOMAIN=md.${BASE_DOMAIN} - CMD_PROTOCOL_USESSL=true - CMD_URL_ADDPORT=false - CMD_ALLOW_ORIGIN=localhost,${BASE_DOMAIN},md.${BASE_DOMAIN} - CMD_CSP_ALLOW_FRAMING=false - CMD_ALLOW_ANONYMOUS=false - CMD_ALLOW_ANONYMOUS_EDITS=false - CMD_ALLOW_FREEURL=true - CMD_REQUIRE_FREEURL_AUTHENTICATION=true - CMD_DEFAULT_PERMISSION=limited - CMD_SESSION_SECRET=${HEDGEDOC_SESSION_SECRET} - CMD_EMAIL=true - CMD_ALLOW_EMAIL_REGISTER=true volumes: - ${BASE_DIR:-/srv}/hedgedoc/uploads:/hedgedoc/public/uploads depends_on: - pg-hackmd networks: - proxy - mail - hedgedoc pg-hedgedoc: image: postgres:${POSTGRES_VERSION}-alpine container_name: pg-hedgedoc restart: "${RESTART:-no}" environment: - POSTGRES_DB=hedgedoc - POSTGRES_USER=hedgedoc - POSTGRES_PASSWORD=${HEDGEDOC_PG_PWD:-password} volumes: - ${BASE_DIR:-/srv}/hedgedoc/psql:/var/lib/postgresql/data networks: - hedgedoc