Setup DNS records for example.com (change this with the actual domain name to be resolved).
To enable Caddy to successfully acquire CA:
- Demo/Testing: Make port 80 and 443 available and disable CloudFlare DNS Delegate until CA(s) are issued successfully.
- Production: Config CloudFlare API Token for 'All zones - DNS:Edit' in Caddyfile global rules, or per-server basis with 'example.com - DNS:Edit' previledge. Follow the instructions on Docker Hub to learn how build an image includes CloudFlare module.
Clone and enter this repository:
git clone [email protected]:kamaslau/trial-caddy.git
cd trial-caddyReady the .env file and Caddyfile:
cp .env.sample .env
nano .env
cp Caddyfile.sample Caddyfile
nano CaddyfileStart up with Docker Compose:
docker compose up -dUpdate existing composed containers using latest images:
docker compose pull && \
docker compose down && \
docker compose up -d