caddy-static
caddywatch
A docker image to automatically serve multiple static websites using Caddy.
Installation and Usage
Run it using something like this docker compose file (either caddy-static-arm64 or caddy-static, depending on your architecture):
version: "3.8"
services:
web:
logging:
driver: journald
options:
tag: web
container_name: web
stdin_open: true
tty: true
ports:
- 8080:8888
volumes:
- /data/websites/:/srv/
image: ghcr.io/ralsina/caddy-static-arm64:latest
restart: always
networks: {}
In /srv/
you should mount a folder that has:
- A subfolder for each site you want to serve, the name of the folder is the domain for the site (like
/srv/ralsina.me
forralsina.me
) - An empty file called
sites
which is writable by the user inside the container (just make it world-writable) - A Caddyfile. Mine is this:
{
http_port 8888
https_port 8887
local_certs
}
import sites
Development & Contributing
I don't expect anyone will use nor contribute to this, but hey:
- Fork it (https://github.com/your-github-user/caddy-static/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Roberto Alsina - creator and maintainer
Repository
caddy-static
Owner
Statistic
- 1
- 0
- 0
- 0
- 1
- 5 months ago
- July 11, 2024
License
MIT License
Links
Synced at
Sun, 22 Dec 2024 05:26:36 GMT
Languages