-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcaddy-compose.yaml
More file actions
38 lines (32 loc) · 917 Bytes
/
Copy pathcaddy-compose.yaml
File metadata and controls
38 lines (32 loc) · 917 Bytes
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
services:
caddy:
container_name: caddy
image: caddy:2.10-alpine
restart: always
annotations:
- nerdctl/bypass4netns=true
environment:
- CADDY_EMAIL=you@cool.com
ports:
- 80:80
- 443:443
- 2020:2020
volumes:
- ~/Caddyfile:/etc/caddy/Caddyfile # main file imports from below
- ~/caddyfiles:/etc/caddy/caddyfiles # place site specific files in ~/caddyfiles/*.caddy
# Certificate storage (IMPORTANT - preserves SSL certs across restarts)
- caddy_data:/data # Certificates stored here
# Config cache (optional but recommended)
- caddy_config:/config
# Optional: If serving static files
# - ./site:/srv
networks:
- caddy_network
volumes:
# Persists SSL certificates - DO NOT DELETE
caddy_data:
# Persists Caddy configuration cache
caddy_config:
networks:
caddy_network:
driver: bridge