1 parent
9ba6571fa6
commit
0d9f3ff447
5 files changed
+20
No files matched your search
@@ -40,3 +40,6 @@ NFS_EXPORT=/exports/rustbox
|
||||
# A shell-exported COMPOSE_PROJECT_NAME overrides the top-level `name:` field.
|
||||
# Recommended launch commands therefore use `docker compose -p rustbox ...`.
|
||||
COMPOSE_PROJECT_NAME=rustbox
|
||||
|
||||
# development = cookies work over plain HTTP; production = Secure cookies, requires HTTPS
|
||||
ENVIRONMENT=development
|
||||
@@ -121,3 +121,17 @@ Replace all example passwords, S3 credentials and `SESSION_ENCRYPTION_KEY` befor
|
||||
The OpenSearch examples disable its security plugin to keep the local Compose topology self-contained. Production should use TLS/authentication and HTTPS URLs in `search.urls`.
|
||||
|
||||
The two cluster-ready examples intentionally start one RustBox application container so they can run directly on a single Docker host. For multiple RustBox application nodes, put them behind an external load balancer and do not publish the same host port from every node; SQL, blob storage and OpenSearch must remain shared between the nodes.
|
||||
|
||||
## Sessions and HTTP/HTTPS
|
||||
|
||||
Docker Compose defaults to `ENVIRONMENT=development`. In this mode session cookies do not carry the `Secure` attribute, so login works when RustBox is opened directly over plain HTTP, for example `http://localhost:3009`.
|
||||
|
||||
For a production deployment behind HTTPS set:
|
||||
|
||||
```bash
|
||||
ENVIRONMENT=production docker compose -p rustbox -f compose-postgres-s3-opensearch.yml up -d --build
|
||||
```
|
||||
|
||||
In `production`, RustBox intentionally marks authentication cookies as `Secure`. Opening the application directly over plain HTTP in that mode causes the browser not to send the session cookie and protected requests return `Invalid or expired session`.
|
||||
|
||||
After changing from production/HTTP to development/HTTP, log in again. If the browser still has stale RustBox state, clear cookies/site data for the RustBox origin once and reload.
|
||||
@@ -44,6 +44,7 @@ services:
|
||||
- "${PORT:-3001}:${PORT:-3001}"
|
||||
environment:
|
||||
RUSTBOX_CONFIG: /etc/rustbox/rustbox.toml
|
||||
ENVIRONMENT: ${ENVIRONMENT:-development}
|
||||
HOST: ${HOST:-0.0.0.0}
|
||||
PORT: ${PORT:-3001}
|
||||
IMAP_HOST: ${IMAP_HOST:-mail.example.com}
|
||||
|
||||
@@ -68,6 +68,7 @@ services:
|
||||
- "${PORT:-3001}:${PORT:-3001}"
|
||||
environment:
|
||||
RUSTBOX_CONFIG: /etc/rustbox/rustbox.toml
|
||||
ENVIRONMENT: ${ENVIRONMENT:-development}
|
||||
HOST: ${HOST:-0.0.0.0}
|
||||
PORT: ${PORT:-3001}
|
||||
IMAP_HOST: ${IMAP_HOST:-mail.example.com}
|
||||
|
||||
@@ -9,6 +9,7 @@ services:
|
||||
- "${PORT:-3001}:${PORT:-3001}"
|
||||
environment:
|
||||
RUSTBOX_CONFIG: /etc/rustbox/rustbox.toml
|
||||
ENVIRONMENT: ${ENVIRONMENT:-development}
|
||||
HOST: ${HOST:-0.0.0.0}
|
||||
PORT: ${PORT:-3001}
|
||||
IMAP_HOST: ${IMAP_HOST:-mail.example.com}
|
||||
|
||||
Reference in new issue
Block a user