Goal
Ship the OntoKit API on Railway so we have a low-cost hosted deployment.
Blocker hit
Railway's free/hobby tier caps build images at 4 GB. The existing Dockerfile.prod produced an image > 5 GB, so the build step failed.
Root cause
sentence-transformers is a core dependency, pulling in PyTorch + transformers + scipy (~2–3 GB).
Dockerfile.prod was single-stage, so pip cache, build tools, and libgit2-dev headers all ended up in the final image.
- The Dockerfile also pre-downloaded the
all-MiniLM-L6-v2 model (~90 MB + cache) at build time.
Work
Goal
Ship the OntoKit API on Railway so we have a low-cost hosted deployment.
Blocker hit
Railway's free/hobby tier caps build images at 4 GB. The existing
Dockerfile.prodproduced an image > 5 GB, so the build step failed.Root cause
sentence-transformersis a core dependency, pulling in PyTorch + transformers + scipy (~2–3 GB).Dockerfile.prodwas single-stage, so pip cache, build tools, andlibgit2-devheaders all ended up in the final image.all-MiniLM-L6-v2model (~90 MB + cache) at build time.Work
DATABASE_URL,REDIS_URL,MINIO_*,ZITADEL_*,SECRET_KEY, …) into the Railway API servicescripts/entrypoint.shpgvectorextension is available on the chosen Postgres