92 lines
2.7 KiB
YAML
92 lines
2.7 KiB
YAML
# Docmost - Modern Wiki / Documentation (Notion-like)
|
|
# Domain: docs.${DOMAIN}
|
|
# Database: PostgreSQL + Redis
|
|
# RAM: ~200MB | Pi-compatible: Heavy but possible
|
|
#
|
|
# Environment variables (set in Portainer):
|
|
# DOMAIN - Your domain (e.g., demo-felhom.eu)
|
|
# APP_SECRET - Random secret for session signing (generate with: openssl rand -hex 32)
|
|
# DB_PASSWORD - PostgreSQL password
|
|
#
|
|
# First-time setup:
|
|
# First registered user becomes admin.
|
|
|
|
services:
|
|
docmost:
|
|
image: docmost/docmost:0.25.3
|
|
container_name: docmost
|
|
restart: unless-stopped
|
|
depends_on:
|
|
docmost-postgres:
|
|
condition: service_healthy
|
|
docmost-redis:
|
|
condition: service_healthy
|
|
environment:
|
|
- APP_SECRET=${APP_SECRET}
|
|
- DATABASE_URL=postgresql://docmost:${DB_PASSWORD}@docmost-postgres:5432/docmost
|
|
- REDIS_URL=redis://docmost-redis:6379
|
|
- APP_URL=https://docs.${DOMAIN}
|
|
- STORAGE_DRIVER=local
|
|
- FILE_UPLOAD_SIZE_LIMIT=50mb
|
|
volumes:
|
|
- docmost_storage:/app/data/storage
|
|
networks:
|
|
- traefik-public
|
|
- docmost-internal
|
|
healthcheck:
|
|
test: ["CMD", "node", "-e", "const http = require('http'); http.get('http://localhost:3000/', (r) => { process.exit(r.statusCode === 200 ? 0 : 1) }).on('error', () => process.exit(1))"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
start_period: 30s
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.docmost.rule=Host(`docs.${DOMAIN}`)"
|
|
- "traefik.http.routers.docmost.entrypoints=websecure"
|
|
- "traefik.http.routers.docmost.tls=true"
|
|
- "traefik.http.routers.docmost.tls.certresolver=letsencrypt"
|
|
- "traefik.http.services.docmost.loadbalancer.server.port=3000"
|
|
|
|
docmost-postgres:
|
|
image: postgres:16-alpine
|
|
container_name: docmost-postgres
|
|
restart: unless-stopped
|
|
environment:
|
|
- POSTGRES_USER=docmost
|
|
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
|
- POSTGRES_DB=docmost
|
|
volumes:
|
|
- docmost_postgres_data:/var/lib/postgresql/data
|
|
networks:
|
|
- docmost-internal
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U docmost -d docmost"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 20s
|
|
|
|
docmost-redis:
|
|
image: redis:7-alpine
|
|
container_name: docmost-redis
|
|
restart: unless-stopped
|
|
command: redis-server --appendonly yes
|
|
volumes:
|
|
- docmost_redis_data:/data
|
|
networks:
|
|
- docmost-internal
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 3
|
|
|
|
volumes:
|
|
docmost_storage:
|
|
docmost_postgres_data:
|
|
docmost_redis_data:
|
|
|
|
networks:
|
|
traefik-public:
|
|
external: true
|
|
docmost-internal: |