Repository navigation
Expand file tree
/
Copy pathcompose.yaml
More file actions
55 lines (51 loc) · 1.58 KB
/
Copy pathcompose.yaml
File metadata and controls
55 lines (51 loc) · 1.58 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
52
53
54
55
# Rostdav behind Caddy (automatic HTTPS).
#
# 1. Put your domain in the environment: export ROSTDAV_DOMAIN=files.example.org
# 2. docker compose -f deploy/compose.yaml up -d --build
# 3. docker compose -f deploy/compose.yaml exec -T rostdav rostdav admin user add alice --admin
#
# With ROSTDAV_DOMAIN unset the site is https://localhost (Caddy's internal CA, for trying it out).
# Ports 80 and 443 must be reachable from the Internet for Let's Encrypt.
services:
rostdav:
build:
context: ..
restart: unless-stopped
environment:
# Only the proxy may say who the client is (X-Forwarded-For); see docs/deployment.md.
ROSTDAV_SERVER__TRUSTED_PROXIES: '["172.30.0.2"]'
# The address the apps and browsers use; shown in the Login Flow and in share links.
ROSTDAV_SERVER__PUBLIC_URL: "https://${ROSTDAV_DOMAIN:-localhost}"
volumes:
- rostdav-data:/data
networks:
default:
ipv4_address: 172.30.0.3
# no published port: only the proxy talks to it
caddy:
image: caddy:2
restart: unless-stopped
depends_on:
rostdav:
condition: service_healthy
ports:
- "${ROSTDAV_HTTP_PORT:-80}:80"
- "${ROSTDAV_HTTPS_PORT:-443}:443"
environment:
ROSTDAV_DOMAIN: "${ROSTDAV_DOMAIN:-localhost}"
volumes:
- ./Caddyfile:/etc/caddy/Caddyfile:ro
- caddy-data:/data
- caddy-config:/config
networks:
default:
ipv4_address: 172.30.0.2
networks:
default:
ipam:
config:
- subnet: 172.30.0.0/24
volumes:
rostdav-data:
caddy-data:
caddy-config: