-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose.yml
29 lines (27 loc) · 1.24 KB
/
docker-compose.yml
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
version: "3.4"
services:
caddy:
container_name: caddy
image: homeall/caddy-reverse-proxy-cloudflare:latest
restart: unless-stopped
environment:
TZ: "Europe/London"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock" #### needs socket to read events
- "./caddy-data:/data" #### needs volume to back up certificates
ports:
- "80:80"
- "443:443"
labels: # Global options
caddy.email: [email protected] #### needs for acme CERT registration account
whoami0:
container_name: whoiam
image: jwilder/whoami:latest
hostname: TheDocker ############################----->>Expected result using curl
restart: unless-stopped
labels:
caddy: your.example.com #### needs for caddy to redirect traffic
caddy.reverse_proxy: "{{upstreams 8000}}" #### needs to tell caddy which port number should send traffic
caddy.tls.protocols: "tls1.3" #### This is optional. Default it is tls1.2
caddy.tls.ca: "https://acme-staging-v02.api.letsencrypt.org/directory" # Needs only for testing purpose. Remove this line after you finished your tests.
caddy.tls.dns: "cloudflare $API-TOKEN" #### You will have to replace here $API-TOKEN with your real scoped API token from Cloudflare.