Phase 1: warp_engine gem skeleton (path gem, mounted engine)

- libs/ruby/warp_engine: gemspec, WarpEngine::Engine (isolate_namespace with
  empty table_name_prefix), WarpEngine.configure surface (container paths,
  update_secret, image_owners), empty engine routes
- host Gemfile: path gem; host routes: mount WarpEngine::Engine => "/" as
  the last entry so host routes always win
- docker: api build context moved to repo root so libs/ is visible at
  bundle-install time; ./libs:/libs runtime mount; root .dockerignore to keep
  data/ and node_modules out of the build context

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-04 18:44:32 +02:00
co-authored by Claude Fable 5
parent bf921c589d
commit 2f6cc4cdc2
13 changed files with 135 additions and 4 deletions
+5 -2
View File
@@ -14,10 +14,13 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
WORKDIR /app
COPY Gemfile ./
# A path gemek /libs alá kerülnek, ugyanoda, ahova a compose mountolja őket,
# így a Gemfile "../../libs/..." relatív útvonala build- és futásidőben is stimmel.
COPY libs /libs
COPY apps/api/Gemfile ./
RUN bundle install
COPY . .
COPY apps/api .
EXPOSE 3000
+4
View File
@@ -1,6 +1,10 @@
source "https://rubygems.org"
gem "rails", "~> 8.0"
# Katalógus-engine. A relatív path hoston (apps/api -> repo-gyökér/libs) és a
# konténerben (/app -> /libs mount) is ugyanoda oldódik fel.
gem "warp_engine", path: "../../libs/ruby/warp_engine"
gem "mysql2", "~> 0.5"
gem "puma", ">= 5.0"
gem "rubyzip", "~> 2.3"
+7
View File
@@ -1,3 +1,9 @@
PATH
remote: ../libs/ruby/warp_engine
specs:
warp_engine (0.1.0)
rails (>= 8.0)
GEM
remote: https://rubygems.org/
specs:
@@ -380,6 +386,7 @@ DEPENDENCIES
sassc-rails
shoulda-matchers (~> 6.0)
sprockets-rails
warp_engine!
BUNDLED WITH
2.5.22
+3
View File
@@ -20,4 +20,7 @@ Rails.application.routes.draw do
end
get "update", to: "update#update"
get "file/*path", to: "files#show", format: false
# Utolsó sor: a host route-jai nyernek, minden mást az engine kap el.
mount WarpEngine::Engine => "/"
end