mirror of
https://github.com/nickyeoman/docker-compose-cookbooks.git
synced 2026-09-04 02:46:23 +00:00
refactor: rewrite docmost_dev to match template conventions
- Rename docker-compose.yml to compose.yaml - Add env var defaults for all images, ports, and secrets - Convert env style from YAML mapping to list style - Use VOL_PATH base /data pattern for all volumes - Add proxy network for docmost, internal network for db/redis - Add missing sample.env with all configurable vars - Rewrite README with new section order and multi-service docs
This commit is contained in:
+60
-4
@@ -1,9 +1,65 @@
|
||||
# Docmost
|
||||
|
||||
ENV: https://docmost.com/docs/self-hosting/environment-variables
|
||||
## Overview
|
||||
|
||||
Redis: https://hub.docker.com/_/redis
|
||||
Docmost is a collaborative wiki and documentation platform, similar to Notion or Outline. It supports real-time editing, page hierarchies, and rich content. This stack includes PostgreSQL for data storage and Redis for session management and caching.
|
||||
|
||||
Postgres: https://hub.docker.com/_/postgres
|
||||
## Project Details
|
||||
|
||||
proxy port: 3000
|
||||
- **Project Repository:** [https://docmost.com/](https://docmost.com/)
|
||||
- **Container Image:** [docmost/docmost](https://hub.docker.com/r/docmost/docmost)
|
||||
- **Reverse Proxy Port:** `3000` (internally), mapped to `8000` by default
|
||||
|
||||
## Getting Started
|
||||
|
||||
Open http://localhost:8000 in your browser:
|
||||
|
||||
1. Create your admin account on first visit
|
||||
2. Start creating pages and organizing your workspace
|
||||
3. Optionally configure SMTP in the compose environment for email invites
|
||||
|
||||
## Environment Variable Notes
|
||||
|
||||
| Variable | Description |
|
||||
|---|---|
|
||||
| `DOCMOST_IMAGE` | Docmost container image (default: `docmost/docmost:latest`) |
|
||||
| `POSTGRES_IMAGE` | PostgreSQL image (default: `postgres:16-alpine`) |
|
||||
| `REDIS_IMAGE` | Redis image (default: `redis:7-alpine`) |
|
||||
| `DOCMOST_RESTART` | Restart policy for all services (default: `unless-stopped`) |
|
||||
| `DOCMOST_PORT` | Published port for the web UI (default: `8000`) |
|
||||
| `VOL_PATH` | Base path for persistent data volumes (default: `/data`) |
|
||||
| `APP_URL` | Public-facing URL of your Docmost instance |
|
||||
| `APP_SECRET` | Secret key used for encryption and sessions — generate a long random string |
|
||||
| `DB_PASSWORD` | Password for the PostgreSQL database user |
|
||||
|
||||
## Volume Notes
|
||||
|
||||
| Volume | Purpose |
|
||||
|---|---|
|
||||
| `${VOL_PATH:-/data}/docmost/storage` | Docmost uploads and data storage |
|
||||
| `${VOL_PATH:-/data}/docmost/db` | PostgreSQL database files |
|
||||
| `${VOL_PATH:-/data}/docmost/redis` | Redis persistence data |
|
||||
|
||||
## Network Notes
|
||||
|
||||
- `proxy` — external network for reverse proxy access to the Docmost web UI
|
||||
- `docmost_internal` — internal bridge network for communication between Docmost, PostgreSQL, and Redis
|
||||
|
||||
Create the proxy network once with:
|
||||
|
||||
```bash
|
||||
docker network create proxy
|
||||
```
|
||||
|
||||
## Docker Run
|
||||
|
||||
This is a multi-service stack — use `docker compose` instead of individual `docker run` commands.
|
||||
|
||||
## Dockhand Stack, Deploy from Git
|
||||
|
||||
- **Cookbooks Repository**
|
||||
- **stackname:** docmost_dev
|
||||
- **Compose file path:** docmost_dev/compose.yaml
|
||||
- **Additional env file (optional):** docmost_dev/sample.env
|
||||
|
||||
Load `docmost_dev/sample.env` into the Environment variables in Dockhand, then create the Stack.
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
---
|
||||
services:
|
||||
docmost:
|
||||
image: docmost/docmost:latest
|
||||
depends_on:
|
||||
- db
|
||||
- redis
|
||||
environment:
|
||||
APP_URL: "http://localhost:8000"
|
||||
APP_SECRET: "REPLACE_WITH_LONG_SECRET"
|
||||
DATABASE_URL: "postgresql://docmost:STRONG_DB_PASSWORD@db:5432/docmost?schema=public"
|
||||
REDIS_URL: "redis://redis:6379"
|
||||
MAIL_DRIVER: smtp
|
||||
SMTP_HOST:
|
||||
SMTP_PORT:
|
||||
SMTP_USERNAME:
|
||||
SMTP_PASSWORD:
|
||||
SMTP_SECURE:
|
||||
MAIL_FROM_ADDRESS: hello@example.com
|
||||
MAIL_FROM_NAME: Docmost
|
||||
ports:
|
||||
- "8000:3000"
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./data/docmost/docmost:/app/data/storage
|
||||
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
environment:
|
||||
POSTGRES_DB: docmost
|
||||
POSTGRES_USER: docmost
|
||||
POSTGRES_PASSWORD: STRONG_DB_PASSWORD
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./data/docmost/db:/var/lib/postgresql/data
|
||||
|
||||
redis:
|
||||
image: redis:7.2-alpine
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./data/docmost/redis:/data
|
||||
|
||||
Reference in New Issue
Block a user