mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-17 13:55:08 +00:00
* docs: reorganize documentation structure into logical categories Restructure documentation into organized directories for better navigation: - getting-started/: Quick start guides for new users - setup/: Setup and configuration guides - production/: Production deployment guides (backup, TLS, multi-tenancy) - operations/: Site operations and management - development/: Development workflow guides - migration/: Migration guides - troubleshooting/: Troubleshooting guides - reference/: Reference documentation (container setup, build configs) Rename files for consistency: - Use kebab-case naming convention throughout - Remove numbered prefixes from container-setup files - Use descriptive names (backup-strategy, tls-ssl-setup, etc.) Update all internal cross-references to reflect new file locations. Update README.md with organized documentation structure. Fix image paths in development.md to use correct relative paths. * docs: add numeric prefixes to directories and files for navigation order Add numeric prefixes (01-08) to documentation directories to indicate reading order and flow for first-time users: - 01-getting-started: Quick start guides - 02-setup: Setup and configuration - 03-production: Production deployment - 04-operations: Site operations - 05-development: Development guides - 06-migration: Migration guides - 07-troubleshooting: Troubleshooting - 08-reference: Reference documentation Add numeric prefixes to files within directories to guide readers through documentation in a logical sequence. Update all cross-references throughout documentation to use new numbered paths. Update README.md to reflect the new structure. * docs: move container-setup to 02-setup and integrate setup-options content Move container-setup directory from 08-reference/ to 02-setup/ to follow PR feedback. The container-setup documentation provides a more linear and coherent flow compared to the previous unstructured setup files. Changes: - Move container-setup/ from docs/08-reference/ to docs/02-setup/ - Integrate content from setup-options.md into structured flow: - Create new 06-setup-examples.md with practical deployment scenarios - Enhance 03-start-setup.md with site creation details from setup-options - Remove redundant 01-setup-options.md (content now integrated) - Rename 02-single-server-example.md to 07-single-server-example.md - Update all cross-references throughout documentation: - Update README.md with new structure under Setup section - Fix links in site-operations.md and migration docs - Add navigation links between container-setup files and examples - Maintain container-setup's linear flow: overview → build → start → env → overrides - Add practical examples document (06-setup-examples.md) that follows the container-setup guide Result: Documentation now follows a clear progression from conceptual overview through practical examples, with all setup information properly organized under 02-setup/. * docs: remove container-setup subfolder and flatten structure Move all files from docs/02-setup/container-setup/ directly into docs/02-setup/ to eliminate unnecessary subfolder. Files are already numbered sequentially, so they work perfectly at the same level. Changes: - Move all files from container-setup/ subfolder to 02-setup/ root - Remove container-setup/ subfolder - Update all cross-references: - Update README.md paths (remove container-setup/ from all links) - Fix references in site-operations.md - Fix references in migration docs - Update internal references in 06-setup-examples.md - Fix relative path references in 01-overview.md, 02-build-setup.md, 03-start-setup.md Result: Cleaner, flatter structure with all numbered setup files at the same level, making navigation more straightforward. * fix: Pre-commit failure is fixed --------- Co-authored-by: adithya <adithya.a@bayesian.in>
112 lines
6.6 KiB
Markdown
112 lines
6.6 KiB
Markdown
# Environment Variables Reference
|
|
|
|
Environment variables configure your Frappe Docker setup. They can be set directly in the container or defined in a `.env` file referenced by Docker Compose.
|
|
|
|
**Getting Started:**
|
|
|
|
```bash
|
|
cp example.env .env
|
|
```
|
|
|
|
Then edit `.env` and set variables according to your needs.
|
|
|
|
---
|
|
|
|
## Required Variables
|
|
|
|
| Variable | Purpose | Example | Notes |
|
|
| ----------------- | ------------------------------------------------ | -------------------------------- | ---------------------------------------------------------------- |
|
|
| `FRAPPE_PATH` | Frappe framework path | https://github.com/frappe/frappe | |
|
|
| `FRAPPE_BRANCH` | Frappe Branch | `version-15` | See [Frappe releases](https://github.com/frappe/frappe/releases) |
|
|
| `ERPNEXT_VERSION` | ERPNext release version | `v15.67.0` | Required although its never used |
|
|
| `DB_PASSWORD` | Password for database root (MariaDB or Postgres) | `secure_password_123` | Not needed if using `DB_PASSWORD_SECRETS_FILE` |
|
|
|
|
---
|
|
|
|
## Database Configuration
|
|
|
|
| Variable | Purpose | Default | When to Set |
|
|
| -------------------------- | ----------------------------------------- | ------------------------------------ | ---------------------------------- |
|
|
| `DB_PASSWORD` | Database root user password | 123 | Always (unless using secrets file) |
|
|
| `DB_PASSWORD_SECRETS_FILE` | Path to file containing database password | — | Setup mariadb-secrets overrider |
|
|
| `DB_HOST` | Database hostname or IP | `db` (service name) | Only if using external database |
|
|
| `DB_PORT` | Database port | `3306` (MariaDB) / `5432` (Postgres) | Only if using external database |
|
|
|
|
---
|
|
|
|
## Redis Configuration
|
|
|
|
| Variable | Purpose | Default | When to Set |
|
|
| ------------- | --------------------------------------------------- | ---------------------------- | ------------------------------------- |
|
|
| `REDIS_CACHE` | Redis hostname for caching | `redis-cache` (service name) | Only if using external Redis instance |
|
|
| `REDIS_QUEUE` | Redis hostname for job queues and real-time updates | `redis-queue` (service name) | Only if using external Redis instance |
|
|
|
|
---
|
|
|
|
## HTTPS & SSL Configuration
|
|
|
|
| Variable | Purpose | Default | When to Set |
|
|
| ------------------- | ------------------------------------------------ | ------- | ---------------------------------------- |
|
|
| `LETSENCRYPT_EMAIL` | Email for Let's Encrypt certificate registration | — | Required if using HTTPS override |
|
|
| `SITES` | List of domains for SSL certificates | — | Required if using reverse proxy override |
|
|
|
|
**Format for `SITES`:**
|
|
|
|
```bash
|
|
# Single site
|
|
SITES=`mysite.example.com`
|
|
|
|
# Wildcard (any subdomain)
|
|
SITES=`{any:.+}`
|
|
```
|
|
|
|
---
|
|
|
|
## Site Configuration
|
|
|
|
| Variable | Purpose | Default | When to Set |
|
|
| ------------------------- | -------------------------------- | ---------------------------------------- | ----------------------------------------------- |
|
|
| `FRAPPE_SITE_NAME_HEADER` | Site name for multi-tenant setup | `$host` (resolved from request hostname) | When accessing by IP or need explicit site name |
|
|
|
|
**Examples:**
|
|
|
|
If your site is named `mysite` but you want to access it via `127.0.0.1`:
|
|
|
|
```bash
|
|
FRAPPE_SITE_NAME_HEADER=mysite
|
|
```
|
|
|
|
If your site is named `example.com` and you access it via that domain, no need to set this (defaults to hostname).
|
|
|
|
---
|
|
|
|
## Image Configuration
|
|
|
|
| Variable | Purpose | Default | Notes |
|
|
| ---------------- | ------------------------------ | --------------------- | ------------------------------------------------------- |
|
|
| `CUSTOM_IMAGE` | Custom Docker image repository | Frappe official image | Leave empty to use default |
|
|
| `CUSTOM_TAG` | Custom Docker image tag | Latest stable | Corresponds to `FRAPPE_VERSION` |
|
|
| `PULL_POLICY` | Image pull behavior | `always` | Options: `always`, `never`, `if-not-present` |
|
|
| `RESTART_POLICY` | Container restart behavior | `unless-stopped` | Options: `no`, `always`, `unless-stopped`, `on-failure` |
|
|
|
|
---
|
|
|
|
## Nginx Proxy Configuration
|
|
|
|
| Variable | Purpose | Default | Allowed Values |
|
|
| ---------------------- | ---------------------------------- | -------------- | -------------------------------------------- |
|
|
| `BACKEND` | Backend service address and port | `0.0.0.0:8000` | `{host}:{port}` |
|
|
| `SOCKETIO` | Socket.IO service address and port | `0.0.0.0:9000` | `{host}:{port}` |
|
|
| `HTTP_PUBLISH_PORT` | Published HTTP port | `8080` | Any available port |
|
|
| `PROXY_READ_TIMEOUT` | Upstream request timeout | `120s` | Any nginx timeout value (e.g., `300s`, `5m`) |
|
|
| `CLIENT_MAX_BODY_SIZE` | Maximum upload file size | `50m` | Any nginx size value (e.g., `100m`, `1g`) |
|
|
|
|
### Real IP Configuration (Behind Proxy)
|
|
|
|
Use these variables when running behind a reverse proxy or load balancer:
|
|
|
|
| Variable | Purpose | Default |
|
|
| ---------------------------- | ------------------------------------------------- | ----------------- |
|
|
| `UPSTREAM_REAL_IP_ADDRESS` | Trusted upstream IP address for real IP detection | `127.0.0.1` |
|
|
| `UPSTREAM_REAL_IP_HEADER` | Request header containing client IP | `X-Forwarded-For` |
|
|
| `UPSTREAM_REAL_IP_RECURSIVE` | Enable recursive IP search | `off` |
|