docs: add example.env and document all environment variables
- Create example.env with all 31 environment variables documented - Update docker-compose.yml to use env_file directive - Update doc/deployment.md with Quick Start and missing variables - Add OXICLOUD_BASE_URL and WOPI configuration docs - Update README.md Docker section with .env setup - Remove duplicate port mapping (incorporates 4577e56) - Fix server port default from 8085 to 8086
This commit is contained in:
+30
-4
@@ -6,11 +6,26 @@ OxiCloud is deployed as a containerized application with PostgreSQL.
|
||||
|
||||
## Docker Setup
|
||||
|
||||
### Quick Start
|
||||
|
||||
1. **Copy the example environment file and customize it:**
|
||||
```bash
|
||||
cp example.env .env
|
||||
# Edit .env with your settings
|
||||
```
|
||||
|
||||
2. **Start the services:**
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
3. **Access OxiCloud:**
|
||||
Open `http://localhost:8086` in your browser.
|
||||
|
||||
### Docker Compose
|
||||
|
||||
```yaml
|
||||
# docker-compose.yml
|
||||
version: '3'
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:17.4-alpine
|
||||
@@ -31,8 +46,8 @@ services:
|
||||
image: oxicloud:latest
|
||||
ports:
|
||||
- "8086:8086"
|
||||
environment:
|
||||
OXICLOUD_DB_CONNECTION_STRING: "postgres://postgres:postgres@postgres/oxicloud"
|
||||
env_file:
|
||||
- .env
|
||||
volumes:
|
||||
- storage_data:/app/storage
|
||||
depends_on:
|
||||
@@ -63,8 +78,9 @@ Non-root user: `oxicloud` (UID/GID 1001). Exposed port: `8086`. Entrypoint: `ent
|
||||
|---|---|---|
|
||||
| `OXICLOUD_STORAGE_PATH` | `./storage` | Root storage directory |
|
||||
| `OXICLOUD_STATIC_PATH` | `./static` | Static files directory |
|
||||
| `OXICLOUD_SERVER_PORT` | `8085` | Server port (note: `main.rs` hardcodes `8086`) |
|
||||
| `OXICLOUD_SERVER_PORT` | `8086` | Server port |
|
||||
| `OXICLOUD_SERVER_HOST` | `127.0.0.1` | Server bind address |
|
||||
| `OXICLOUD_BASE_URL` | (auto-detected) | Public base URL for share links. If not set, uses `http://{host}:{port}` |
|
||||
|
||||
### Database
|
||||
|
||||
@@ -112,6 +128,16 @@ Non-root user: `oxicloud` (UID/GID 1001). Exposed port: `8086`. Entrypoint: `ent
|
||||
|
||||
If **OXICLOUD_OIDC_ENABLED** is `true` but **issuer_url**, **client_id**, or **client_secret** are empty, OIDC is automatically disabled with an error log.
|
||||
|
||||
### WOPI (Office Document Editing)
|
||||
|
||||
| Variable | Default | Description |
|
||||
|---|---|---|
|
||||
| `OXICLOUD_WOPI_ENABLED` | `false` | Enable WOPI integration for office document editing |
|
||||
| `OXICLOUD_WOPI_DISCOVERY_URL` | (empty) | WOPI client discovery URL (e.g., Collabora, OnlyOffice) |
|
||||
| `OXICLOUD_WOPI_SECRET` | (falls back to JWT secret) | Secret key for signing WOPI access tokens |
|
||||
| `OXICLOUD_WOPI_TOKEN_TTL_SECS` | `86400` (24h) | WOPI access token lifetime |
|
||||
| `OXICLOUD_WOPI_LOCK_TTL_SECS` | `1800` (30m) | WOPI lock expiration time |
|
||||
|
||||
---
|
||||
|
||||
## Internal Configuration (Not Environment-Configurable)
|
||||
|
||||
@@ -1055,7 +1055,6 @@ services:
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "8086:8086"
|
||||
- "8085:8085"
|
||||
networks:
|
||||
- oxicloud
|
||||
depends_on:
|
||||
|
||||
Reference in New Issue
Block a user