Last active
June 12, 2024 02:59
-
-
Save darklinden/a217235035419216d2c388631c7b6318 to your computer and use it in GitHub Desktop.
caddyfile for simple file server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# docker-compose.yml | |
version: "3" | |
services: | |
caddy: | |
image: caddy:2.8-alpine | |
restart: unless-stopped | |
ports: | |
- "80:80" | |
volumes: | |
- ./Caddyfile:/etc/caddy/Caddyfile | |
- ./site:/usr/share/caddy | |
# Caddyfile | |
:80 { | |
# Set this path to your site's directory. | |
root * /usr/share/caddy | |
# Enable the static file server. | |
file_server browse { | |
hide @eaDir .DS_Store .git | |
precompressed zstd br gzip | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment