docs: Formalize Synology NAS repo standards with REQUIREMENTS.md, maintenance instructions, and setup guides. Fix service typos and standardize filenames.

This commit is contained in:
2026-02-22 12:43:12 -05:00
parent 33ddf7705e
commit 5ba88c9ae4
6 changed files with 148 additions and 3 deletions

29
REQUIREMENTS.md Normal file
View File

@@ -0,0 +1,29 @@
# Synology NAS Docker Service Requirements
This document outlines the mandatory standards for services managed in this repository via Portainer.
## 1. User Management
- **Dedicated User**: Every service must have a dedicated local user created on the Synology DSM.
- **Non-Root Execution**: Containers must run under the service-specific PUID and PGID whenever possible.
- **Root Exception**: Only services that strictly require root privileges (e.g., Traefik, Cloudflared in some network modes) are allowed to run as root.
## 2. File and Folder Structure
- **Base Path**: `/volume1/docker/`
- **Service Data**: All configuration, database, and system-related files must reside in `/volume1/docker/<service_name>`.
- **User Data (Large)**: Large user-managed files (e.g., ebooks, movies, paperless documents) must reside in `/volume1/media/<type>/`.
- **Hierarchy Example**:
- `/volume1/docker/calibre/` (Config, DB)
- `/volume1/media/ebooks/` (EPUB/PDF files)
## 3. Deployment and Setup
- **Idempotent Scripts**: Every service must include a `create_<service>_folders.sh` script.
- **Setup Documentation**: Every service folder must contain a `SETUP.md` file documenting the end-to-end flow, highlighting manual pre-setup steps (user creation, ID lookup).
- **Script Requirements**:
- Must use `mkdir -p` to handle existing directories.
- Must set correct ownership (`chown`) and permissions (`chmod`) based on the service user.
- Must be safe to run multiple times without causing errors or data loss.
- **Stack Grouping**: It is encouraged to group related containers (e.g., App, DB, Redis) into a single Portainer stack file.
## 4. Configuration
- **Environment Variables**: Use `stack.env` or Portainer environment variables for sensitive data.
- **Parametrization**: Ideally, use `${PUID}`, `${PGID}`, and `${TZ}` variables to maintain portability across different user accounts.