-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose-debug-caddy.yaml
98 lines (88 loc) · 2.83 KB
/
docker-compose-debug-caddy.yaml
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
version: "3"
volumes:
caddy-data:
caddy-config:
services:
caddy:
# cf. https://blog.kurokobo.com/archives/3669#Caddy_acme_server
image: caddy:2
ports:
- 80:80
- 443:443
- 443:443/udp
- 9000:9000
environment:
- DOMAIN=${DOMAIN}
- EMAIL4CERTS=${EMAIL4CERTS}
- BSKY_ADMIN_PASSWORDS=${BSKY_ADMIN_PASSWORDS}
- bgsFQDN=${bgsFQDN}
- bskyFQDN=${bskyFQDN}
- feedgenFQDN=${feedgenFQDN}
- jetstreamFQDN=${jetstreamFQDN}
- ozoneFQDN=${ozoneFQDN}
- palomarFQDN=${palomarFQDN}
- pdsFQDN=${pdsFQDN}
- plcFQDN=${plcFQDN}
- publicApiFQDN=${publicApiFQDN}
- socialappFQDN=${socialappFQDN}
volumes:
- ./config/caddy/Caddyfile:/etc/caddy/Caddyfile
# CA certificates for self-signed. >>>
- ./certs/root.crt:/data/caddy/pki/authorities/local/root.crt
- ./certs/root.key:/data/caddy/pki/authorities/local/root.key
# CA certificates for self-signed. <<<
- caddy-data:/data
- caddy-config:/config
healthcheck:
# https://caddy.community/t/what-is-the-best-practise-for-doing-a-health-check-for-caddy-containers/12995
test: "wget --no-verbose --tries=1 --spider http://localhost:2019/metrics || exit 1"
interval: 5s
retries: 20
# starts: to generate HTTPS certifications on-demand >>>>>
caddy-sidecar:
image: httpd:2
environment:
- GOINSECURE=${GOINSECURE}
- NODE_TLS_REJECT_UNAUTHORIZED=${NODE_TLS_REJECT_UNAUTHORIZED}
volumes:
- ./certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt:ro
# ends: to generate HTTPS certifications on-demand <<<<<
test-wss:
image: itaru2622/fastapi:bookworm
environment:
- app=main:app
- opts=--host 0.0.0.0 --port 8080
working_dir: /opt/fastapi-samples/3catchall
test-ws:
image: itaru2622/fastapi:bookworm
environment:
- app=main:app
- opts=--host 0.0.0.0 --port 8080
working_dir: /opt/fastapi-samples/3catchall
# starts: fakes to check caddy mapping rule for social-app, pds, bsky(appview) >>>>>>>>>>
# refer https://github.com/itaru2622/docker-fastapi.git for docker image of itaru2622/fastapi
social-app:
image: itaru2622/fastapi:bookworm
ports:
- 8001:8100
environment:
- app=main:app
- opts=--host 0.0.0.0 --port 8100
working_dir: /opt/fastapi-samples/3catchall
pds:
image: itaru2622/fastapi:bookworm
ports:
- 2583:2583
environment:
- app=main:app
- opts=--host 0.0.0.0 --port 2583
working_dir: /opt/fastapi-samples/3catchall
bsky:
image: itaru2622/fastapi:bookworm
ports:
- 2584:2584
environment:
- app=main:app
- opts=--host 0.0.0.0 --port 2584
working_dir: /opt/fastapi-samples/3catchall
# ends: fakes to check caddy mapping rule for social-app, pds, bsky(appview) <<<<<<<<<<