mirror of
https://github.com/readest/readest.git
synced 2026-11-29 19:02:28 +00:00
* fix(docker): apply db migrations on first boot and let the font CDN be overridden (#5550) A fresh self-hosted stack only ran volumes/db/init/schema.sql, so the incremental files under volumes/db/migrations never reached the database. Deployments came up without files.replica_id, the replicas table and the claim_inbox_item RPC, which broke uploads, replica sync and Send to Readest. Mount the migrations directory into the db container together with an apply-migrations.sh hook named so it sorts after the supabase image's own migrate.sh. It globs the mounted directory, so a new migration file needs no compose change, and it records what it applied in readest_meta.migrations so it can be re-run by hand after an upgrade. The reader also loaded its CJK webfont bundles from storage.readest.com, which only sends CORS headers for readest.com origins, so they were blocked on a custom domain. Read the base URL from runtime config via FONT_BASE_URL and keep the CDN as the default. Let SUPABASE_PUBLIC_URL and S3_PUBLIC_ENDPOINT be set directly instead of only being derived from HOST_IP, so the stack can be served from one HTTPS origin. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * docs(docker): add an example nginx config for a single HTTPS origin Keeps the template out of the README as a copyable file next to .env.example. Routes / to the client, /auth/v1 and /rest/v1 to kong, and the bucket prefix to minio with the Host header preserved so presigned signatures still verify. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| api | ||
| db | ||