-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.example.yml
More file actions
51 lines (48 loc) · 1.65 KB
/
Copy pathdocker-compose.example.yml
File metadata and controls
51 lines (48 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Example Docker Compose for EctoTrees server with Caddy as a reverse proxy
#
# Usage:
# 1. Copy this file: cp docker-compose.example.yml docker-compose.yml
#
# 2. Create required directories
# mkdir -p caddy/{caddy_data,caddy_config}
#
# 3. Copy the Caddyfile to your caddy directory using
# curl -o caddy/Caddyfile https://raw.githubusercontent.com/Ectropy/ectotrees/main/Caddyfile
#
# 4. Update your Caddyfile to use the domain you wish to host at
# nano ./Caddyfile
#
# 5. Start: docker compose up -d
services:
app:
image: ghcr.io/ectropy/ectotrees:latest
container_name: ectotrees
environment:
NODE_ENV: production
PORT: 3001
# Required in production: public URL where the app is served.
# Drives the WebSocket origin allowlist and invite-link generation.
# The server hard-fails on startup if this is unset or invalid.
APP_URL: https://ectotrees.example.com
# Optional: comma-separated additional allowed origins (e.g. legacy domains).
# EXTRA_ORIGINS: https://old.example.com
# Required in production: directory where session state is snapshotted so
# sessions survive container redeploys. Must point at a mounted volume —
# the server hard-fails on startup if unset or not writable.
DATA_DIR: /app/data
volumes:
- ./data:/app/data
expose:
- "3001"
restart: unless-stopped
caddy:
image: caddy:latest
container_name: caddy
restart: unless-stopped
ports:
- "8085:80"
- "8443:443"
volumes:
- ./caddy/Caddyfile:/etc/caddy/Caddyfile:ro
- ./caddy/caddy_data:/data
- ./caddy/caddy_config:/config