Files
Docwell/Docker/.env.prod.seaweedfs.split.example
T

148 lines
6.5 KiB
Bash

# Docwell: production stack config (Docker/docker-compose.prod.seaweedfs.split.yml).
# Copy to .env and fill in, then:
# docker compose -f docker-compose.prod.seaweedfs.split.yml pull
# docker compose -f docker-compose.prod.seaweedfs.split.yml up -d
# --- Images ------------------------------------------------------------------
# Registry and tag for docwell-server and docwell-web. For images released on a
# Gitea server, DOCWELL_REGISTRY=<gitea host>/<owner>. Pin a version in
# production.
DOCWELL_REGISTRY=ghcr.io/docwell
DOCWELL_VERSION=latest
# docwell-db is a stock PocketBase; docwell-server applies Docwell's schema to
# it on start. The default, tajniak81/pocketbase-docker-root:0.40.6, creates
# the superuser below. Another PocketBase image works if it does the same.
# DB_IMAGE=tajniak81/pocketbase-docker-root:0.40.6
# Or override the Docwell images one at a time (a mirror, a hotfix tag):
# SERVER_IMAGE=ghcr.io/docwell/docwell-server:1.0.0
# WEB_IMAGE=ghcr.io/docwell/docwell-web:1.0.0
# MEDIA_IMAGE=ghcr.io/docwell/docwell-media:1.0.0
# --- PocketBase superuser ----------------------------------------------------
# docwell-db creates it on the first boot; docwell-server signs in with it.
# REQUIRED. Changing the password here later does not change it in the
# database; see README.md, "Changing the PocketBase password".
PB_ADMIN_EMAIL=admin@example.com
PB_ADMIN_PASSWORD=change-me-long-password
# Encrypts PocketBase's stored settings (SMTP password, S3 secret). Exactly 32
# characters, e.g. `openssl rand -hex 16`. Blank = off. Set it before the first
# boot and keep a copy: the settings cannot be read without it.
PB_ENCRYPTION_KEY=
# --- Public addresses --------------------------------------------------------
# Where browsers reach docwell-web and docwell-server. Behind a reverse proxy
# these are the https:// names, and DOCWELL_COLLAB_URL is wss://.
DOCWELL_WEB_URL=http://localhost:3000
DOCWELL_PUBLIC_URL=http://localhost:8080
DOCWELL_COLLAB_URL=ws://localhost:8080/collab
# Browser origins allowed to call the API. Defaults to DOCWELL_WEB_URL.
# DOCWELL_CORS_ORIGINS=https://docs.example.com
# Name shown in emails and the browser tab. Blank = Docwell.
DOCWELL_APP_NAME=
# The Draw.io editor to embed. Blank = https://embed.diagrams.net; point it at
# a self-hosted jgraph/drawio to keep drawings on your network.
DOCWELL_DRAWIO_URL=
# --- Accounts ----------------------------------------------------------------
# Sign-up defaults until a superadmin changes them in the admin panel. The
# first account can always sign up and becomes the instance admin.
DOCWELL_SIGNUP_ENABLED=true
# Comma-separated email domains allowed to sign up (blank = any).
DOCWELL_SIGNUP_DOMAINS=
# Optional: the first account, created as superadmin on start while the
# instance has no accounts. Later starts leave it alone (change it in the
# admin panel). Password: 8 characters or more. Blank = first sign-up wins.
DOCWELL_ADMIN_EMAIL=
DOCWELL_ADMIN_PASSWORD=
DOCWELL_ADMIN_NAME=
# Largest attachment in MB (1-100).
DOCWELL_MAX_UPLOAD_MB=50
# Recordings over 25 MB are cut for transcription by the media service
# (docwell-media, ffmpeg in a container of its own). Optional shared secret
# between it and docwell-server. To run without it, remove the media service
# and set DOCWELL_MEDIA_URL= (blank): MP3 and WAV are then cut by the server.
DOCWELL_MEDIA_TOKEN=
# Optional OAuth apps people sign in to. Google: Google Calendar on journal
# pages (calendar.readonly). Microsoft: importing whole OneNote notebooks
# (Notes.Read). Register {DOCWELL_PUBLIC_URL}/api/v1/oauth/google/callback
# and .../oauth/microsoft/callback as redirect URIs. Blank = off.
DOCWELL_GOOGLE_CLIENT_ID=
DOCWELL_GOOGLE_CLIENT_SECRET=
DOCWELL_MICROSOFT_CLIENT_ID=
DOCWELL_MICROSOFT_CLIENT_SECRET=
# "common" (any account), "organizations", "consumers" or a tenant id.
DOCWELL_MICROSOFT_TENANT=common
# Days to keep audit log entries. Blank = 365, 0 = forever.
DOCWELL_AUDIT_RETENTION_DAYS=
# --- Email -------------------------------------------------------------------
# One mail server for everything: PocketBase sends verification, password reset
# and sign-in emails, docwell-server sends invites and notifications.
# docwell-server writes these into PocketBase on every start. Blank host = the
# admin panel's Email screen stays in charge.
DOCWELL_SMTP_HOST=
DOCWELL_SMTP_PORT=587
DOCWELL_SMTP_USERNAME=
DOCWELL_SMTP_PASSWORD=
DOCWELL_SMTP_TLS=false
DOCWELL_MAIL_FROM=no-reply@example.com
# --- Ports -------------------------------------------------------------------
# docwell-web and docwell-server are both public: the browser loads the app
# from the first and calls the API on the second. Behind a reverse proxy on
# this host, bind them to 127.0.0.1.
WEB_BIND=0.0.0.0
WEB_PORT=3000
SERVER_BIND=0.0.0.0
SERVER_PORT=8080
# The PocketBase dashboard (/_/). Loopback only; use an SSH tunnel to reach it.
PB_BIND=127.0.0.1
PB_PORT=8070
# --- Storage -----------------------------------------------------------------
# Docker-managed named volumes by default; set absolute host paths for bind
# mounts, e.g. PB_DATA=/srv/docwell/pb_data.
# PB_DATA: database, uploaded files, PocketBase backups. Back this up.
PB_DATA=pb_data
# SERVER_DATA: the search index, rebuilt from the database when missing.
SERVER_DATA=server_data
# --- File storage: SeaweedFS -------------------------------------------------
# Uploaded files go to a SeaweedFS bucket in this stack instead of PB_DATA; the
# database and PocketBase's backups stay where they are.
#
# One key pair, used by both sides: SeaweedFS accepts it and PocketBase signs
# in with it. Generate long random values, e.g. `openssl rand -hex 20`.
DOCWELL_S3_ACCESS_KEY=
DOCWELL_S3_SECRET=
DOCWELL_S3_BUCKET=docwell
DOCWELL_S3_REGION=us-east-1
# SEAWEED_DATA: where SeaweedFS keeps the files. Named volume by default, or an
# absolute host path. Back it up together with PB_DATA.
SEAWEED_DATA=seaweed_data
# SEAWEED_IMAGE=chrislusf/seaweedfs:4.45
# Existing uploads are NOT copied when this is switched on. See README.md,
# "Switching an existing install to S3".
# --- SeaweedFS admin UI ------------------------------------------------------
# Cluster view and Object Store -> Users (mint and revoke S3 keys). REQUIRED:
# the panel can hand out keys to the bucket, so it never runs without a login.
SEAWEED_ADMIN_USER=admin
SEAWEED_ADMIN_PASSWORD=
# Optional view-only login.
SEAWEED_ADMIN_READONLY_USER=
SEAWEED_ADMIN_READONLY_PASSWORD=
# Loopback by default; open http://localhost:23646 on the host or tunnel to it.
SEAWEED_ADMIN_BIND=127.0.0.1
SEAWEED_ADMIN_PORT=23646
SEAWEED_ADMIN_DATA=seaweed_admin