persist image cache on fly volume across deploys
All checks were successful
deploy / deploy (push) Successful in 3m36s

Image variants were written to the ephemeral release directory
and wiped on every deploy, causing 500 errors with 50s timeouts
as browsers waited for images that could never be served.

- Point image_cache_dir at /data/image_cache in prod
- Add Plug.Static to serve from the persistent volume
- Exclude /image_cache/ from broken URL tracking

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jamey
2026-03-02 09:49:53 +00:00
parent e787f1f663
commit 9a27723b52
3 changed files with 13 additions and 0 deletions

View File

@@ -19,5 +19,8 @@ config :logger, level: :info
# Structured JSON logs for production (machine-parseable by fly logs, journalctl, Loki, etc.)
config :logger, :default_handler, formatter: {LoggerJSON.Formatters.Basic, []}
# Persistent image cache on the Fly volume (survives deploys)
config :berrypod, :image_cache_dir, "/data/image_cache"
# Runtime production configuration, including reading
# of environment variables, is done on config/runtime.exs.