-
-
Notifications
You must be signed in to change notification settings - Fork 1
Caddy v1.0.5
-
Create a Caddyfile with the content you would like.
-
Create a data directory:
mkdir data -
Change the ownership and permission to match the Docker container
chown 1000 Caddyfile data chmod 700 Caddyfile data
If you are on Windows, you may skip this step.
-
Assuming your current file path is
/yourpath, run the container with:docker run -d --name caddy \ -v /yourpath/Caddyfile:/Caddyfile:ro \ -v /yourpath/data:/data \ -p 80:8080/tcp -p 443:8443/tcp \ qmcgaw/caddy-scratch:v1.0.5
You can also run the container with docker-compose up -d and using this docker-compose.yml:
version: "3.7"
services:
caddy:
image: qmcgaw/caddy-scratch:v1.0.5
container_name: caddy
volumes:
- ./Caddyfile:/Caddyfile:ro
- ./data:/data
network_mode: bridge
ports:
- 80:8080/tcp
- 443:8443/tcp
environment:
- TZ=
restart: alwaysIf log times are not correct, it's because you need to set your timezone in the TZ environment variable. For example, add -e TZ=America/Montreal to your Docker run command.
Update the docker image with docker pull qmcgaw/caddy-scratch:v1.0.5.
Note that no updates should be brought up to v1.0.5, you should switch to the :v2.0.0 or :latest Docker tag.
You need Git installed.
If you want to have for example the minify and the ipfilter plugins, build the image with:
docker build -t qmcgaw/caddy:v1.0.5 --build-arg PLUGINS=minify,ipfilter https://github.com/qdm12/caddy-scratch.git#v1.0.5To reload the Caddyfile in Caddy, use:
docker kill --signal=USR1 caddyYou need Git installed.
Telemetry is disabled by default. You can enable it by building the image with:
docker build -t qmcgaw/caddy:v1.0.5 --build-arg TELEMETRY=true https://github.com/qdm12/caddy-scratch.git#v1.0.5