Back to Charts

⚠️ Repo Archive Notice

stable/hackmd/README.md

latest3.9 KB
Original Source

⚠️ Repo Archive Notice

As of Nov 13, 2020, charts in this repo will no longer be updated. For more information, see the Helm Charts Deprecation and Archive Notice, and Update.

HackMD

HackMD is a realtime, multiplatform collaborative markdown note editor.

DEPRECATION NOTICE

This chart is deprecated and no longer supported.

Introduction

This chart bootstraps a HackMD deployment on a Kubernetes cluster using the Helm package manager.

It also packages the PostgreSQL which is required for bootstrapping a PostgreSQL deployment for the database requirements of the HackMD application.

Prerequisites

  • Kubernetes 1.8+
  • PV provisioner support in the underlying infrastructure

Install

console
$ git clone https://github.com/hackmdio/docker-hackmd.git
$ helm install stable/hackmd

Configuration

The following configurations may be set. It is recommended to use values.yaml for overwriting the hackmd config.

ParameterDescriptionDefault
deploymentStrategyDeployment strategy.RollingUpdate
replicaCountHow many replicas to run.1
image.repositoryName of the image to run, without the tag.hackmdio/hackmd
image.tagThe image tag to use.1.3.0-alpine
image.pullPolicyThe kubernetes image pull policy.IfNotPresent
service.nameThe kubernetes service name to use.hackmd
service.typeThe kubernetes service type to use.ClusterIP
service.portService port.3000
ingress.enabledIf true, Ingress will be createdfalse
ingress.annotationsIngress annotations[]
ingress.hostsIngress hostnames[]
ingress.tlsIngress TLS configuration (YAML)[]
resourcesResource requests and limits{}
persistence.enabledIf true, Persistent Volume Claim will be createdtrue
persistence.accessModesPersistent Volume access modes[ReadWriteOnce]
persistence.annotationsPersistent Volume annotations{}
persistence.existingClaimPersistent Volume existing claim name""
persistence.sizePersistent Volume size2Gi
persistence.storageClassPersistent Volume Storage Classunset
extraVarsHackmd's extra environment variables[]
podAnnotationsPod annotations{}
sessionSecretHackmd's session secret"" (Randomly generated)
postgresql.installEnable PostgreSQL as a chart dependencytrue
postgresql.imageTagThe image tag for PostgreSQL9.6.2
postgresql.postgresUserPostgreSQL User to createhackmd
postgresql.postgresHostPostgreSQL host (if postgresql.install == false)nil
postgresql.postgresPasswordPostgreSQL Password for the new userrandom 10 characters
postgresql.postgresDatabasePostgreSQL Database to createhackmd

Use persistent volume for image uploads

If you want to use a Kubernetes Persistent volume for image upload (enabled by default), you can encourter a problem where your volume doesn't have proper ownershuip, so HackMD won't be able to write into it. You can use set the HMD_IMAGE_UPLOAD_TYPE to filesystem in your values.yaml to have the Docker entrypoint change volume's ownership:

yaml
extraVars:
  - name: HMD_IMAGE_UPLOAD_TYPE
    value: filesystem

Use behind a TLS reverse proxy

If you use HackMD behind a reverse proxy that does TLS decryption and forwards traffic in plain HTTP, you have to enable the following variables in your values.yaml:

yaml
extraVars:
  - name: CMD_DOMAIN
    value: change.this.to.your.own.fqdn
  - name: CMD_PROTOCOL_USESSL
    value: "true"
  - name: CMD_URL_ADDPORT
    value: "false"