1. The problem I’m having:
I’m using Caddy as a file server to serve RSS feeds using generated XML files. I’m able to do this using my Caddyfile, however, Caddy isn’t refreshing the file/feed when I update the file on the backend.
For example, I can successfully use Caddy to serve a file called atom.xml with 20 RSS feed items at myfeeds.duckdns.org/rss/atom.xml. However, when I add a new item to the file so that there are now 21 feed items, Caddy won’t pick up the 21st item and continues displaying the initial 20.
Manually restarting the Caddy container does not seem to resolve the issue.
2. Error messages and/or full log output:
N/A
3. Caddy version:
Caddy v2.6.4
4. How I installed and ran Caddy:
a. System environment:
Docker, docker-compose on Debian
b. Command:
N/A
c. Service/unit/compose file:
caddy:
image: caddy:2
container_name: caddy
restart: unless-stopped
ports:
- 443:443
volumes:
- ${APPDATA}/caddy/Caddyfile:/etc/caddy/Caddyfile
- ${APPDATA}/caddy/site:/srv
- ${APPDATA}/caddy/data:/data
- ${APPDATA}/caddy/config:/config
networks:
- caddy
d. My complete Caddy config:
myfeeds.duckdns.org {
# Serve all static files stored in /srv/rss folder
file_server /rss/*
}