hedgedoc++
This commit is contained in:
parent
d0773c0ac3
commit
5e5cea9dd6
3 changed files with 62 additions and 0 deletions
12
hedgedoc_cloudflare/.env
Normal file
12
hedgedoc_cloudflare/.env
Normal file
|
@ -0,0 +1,12 @@
|
|||
# CloudFlare Tunnel Token
|
||||
TUNNEL_TOKEN=
|
||||
|
||||
# Domain this is being hosted on
|
||||
DOMAIN=docs.mydomain.com
|
||||
|
||||
# Unique database password
|
||||
DB_PASSWORD= ##REQUIRED##
|
||||
|
||||
# Session secret. Pick a big random string. If this changes
|
||||
# user sessions will be terminated.
|
||||
SECRET= ##REQUIRED##
|
14
hedgedoc_cloudflare/README.md
Normal file
14
hedgedoc_cloudflare/README.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
# HedgeDoc and Cloudflare
|
||||
|
||||
I use HedgeDoc all the time for proofing up blog posts, collaborative documentation, etc.
|
||||
|
||||
Very little setup required.
|
||||
|
||||
Requires:
|
||||
* Cloudflare Tunnel
|
||||
|
||||
Steps:
|
||||
|
||||
1. Setup your Tunnel (pointing to `http://app:3000`)
|
||||
2. Set Cloudflare Tunnel token and other secrets in in `.env`
|
||||
4. `docker compose up -d`
|
36
hedgedoc_cloudflare/docker_compose.yml
Normal file
36
hedgedoc_cloudflare/docker_compose.yml
Normal file
|
@ -0,0 +1,36 @@
|
|||
services:
|
||||
tunnel:
|
||||
image: cloudflare/cloudflared
|
||||
command: tunnel --no-autoupdate run
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
- TUNNEL_TOKEN=${TUNNEL_TOKEN}
|
||||
|
||||
database:
|
||||
image: postgres:13.4-alpine
|
||||
environment:
|
||||
- POSTGRES_USER=hedgedoc
|
||||
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
||||
- POSTGRES_DB=hedgedoc
|
||||
volumes:
|
||||
- ./data/database:/var/lib/postgresql/data
|
||||
restart: always
|
||||
|
||||
app:
|
||||
image: quay.io/hedgedoc/hedgedoc:latest
|
||||
environment:
|
||||
- CMD_DB_URL=postgres://hedgedoc:${DB_PASSWORD}@database:5432/hedgedoc
|
||||
- CMD_DOMAIN=${DOMAIN}
|
||||
- CMD_URL_ADDPORT=false
|
||||
- TZ=America/Edmonton
|
||||
- CMD_SESSION_SECRET=${SECRET}
|
||||
# hint so that it knows it's being Cloudflare
|
||||
- CMD_PROTOCOL_USESSL=true
|
||||
volumes:
|
||||
- ./data/uploads:/hedgedoc/public/uploads
|
||||
restart: always
|
||||
depends_on:
|
||||
- database
|
||||
volumes:
|
||||
database:
|
||||
uploads:
|
Loading…
Reference in a new issue