Files
InkNote/docker-compose.yml
T
marcandClaude Opus 5 a61e6901b1 Move .env.example where Compose actually looks, and make it true
It sat in backend/ while Compose reads .env from the repository root, so
the "cp .env.example .env" in the compose header pointed at nothing.

It also documented four settings that Compose never forwarded to the
container: ALLOWED_ORIGINS and the three version-retention knobs would
have been set in .env and silently done nothing. They are passed through
now, unset meaning the server's own defaults. Checked both directions:
every variable Compose reads is documented, and nothing documented is
ignored.

Dropped PORT from the example — the bundled nginx proxies to 4000 by
name, so changing it could only break that. Added the data-directory and
uid/gid settings, which were read but undocumented.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-08 13:09:29 +02:00

56 lines
2.5 KiB
YAML

# ─────────────────────────────────────────────
# InkNote — deploy from the Gitea container registry
#
# mkdir -p /srv/inknote/{db,uploads}
# chown -R 1000:1000 /srv/inknote
# cp .env.example .env && edit it # secrets + first admin
# docker login gitea.honeyy.duckdns.org
# docker compose pull && docker compose up -d
#
# Data lives under INKNOTE_DATA_DIR (default /srv/inknote) on the host, so
# whatever backs up the host also backs up InkNote. Back that path up together
# with the .env: the notes are encrypted and unreadable without ENCRYPTION_KEY.
# ─────────────────────────────────────────────
services:
inknote-server:
image: gitea.honeyy.duckdns.org/docker/inknote-server:latest
container_name: inknote-server
restart: unless-stopped
environment:
- PORT=4000
- JWT_SECRET=${JWT_SECRET}
- ENCRYPTION_KEY=${ENCRYPTION_KEY}
# Settles who the first administrator is — on an empty database by
# creating them, on an upgraded one by choosing whom to promote. Ignored
# entirely once an admin exists, so they can never reset anything.
- INKNOTE_ADMIN_USER=${INKNOTE_ADMIN_USER:-}
- INKNOTE_ADMIN_PASSWORD=${INKNOTE_ADMIN_PASSWORD:-}
- NODE_ENV=production
# Optional tuning; unset means the server's own defaults apply.
- ALLOWED_ORIGINS=${ALLOWED_ORIGINS:-}
- MAX_VERSIONS_PER_NOTE=${MAX_VERSIONS_PER_NOTE:-}
- VERSION_RETENTION_DAYS=${VERSION_RETENTION_DAYS:-}
- VERSION_COALESCE_MINUTES=${VERSION_COALESCE_MINUTES:-}
# Bind mounts, not named volumes: the data sits in a plain directory on the
# Docker host, so whatever backs up the host also backs up InkNote.
# Create it first: mkdir -p /srv/inknote/{db,uploads} && chown -R 1000:1000 /srv/inknote
user: "${INKNOTE_UID:-1000}:${INKNOTE_GID:-1000}"
volumes:
- ${INKNOTE_DATA_DIR:-/srv/inknote}/db:/app/data
- ${INKNOTE_DATA_DIR:-/srv/inknote}/uploads:/app/uploads
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:4000/api/health"]
interval: 30s
timeout: 5s
retries: 3
inknote-web:
image: gitea.honeyy.duckdns.org/docker/inknote-web:latest
container_name: inknote-web
restart: unless-stopped
ports:
- "3000:80"
depends_on:
inknote-server:
condition: service_healthy