add Docker deployment with Alpine image, release config and health check

- Alpine multi-stage Dockerfile (131 MB image)
- Release overlays (bin/server, bin/migrate), env.sh, Release module
- Health check endpoint at GET /health
- Fly.io config with SQLite volume mount
- Fix hardcoded paths in optimizer.ex and variant_cache.ex to use
  Application.app_dir/2 (breaks in releases where Plug.Static serves
  from a different directory than CWD)
- strip_beams: true in release config
- Optimised .dockerignore and .gitignore for mockup variants

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jamey
2026-02-08 16:21:05 +00:00
parent eaa4bbb3fa
commit 1ee37c853d
15 changed files with 320 additions and 32 deletions

View File

@@ -10,6 +10,7 @@ defmodule SimpleshopTheme.MixProject do
start_permanent: Mix.env() == :prod,
aliases: aliases(),
deps: deps(),
releases: [simpleshop_theme: [strip_beams: true]],
compilers: [:phoenix_live_view] ++ Mix.compilers(),
listeners: [Phoenix.CodeReloader],
dialyzer: [ignore_warnings: ".dialyzer_ignore.exs"]