datacenterbingo/config.ru
Sergei Poljanski 062611fa21
Some checks failed
Build and Deploy to Production / test (push) Failing after 21s
Build and Deploy to Production / build (push) Has been skipped
Build and Deploy to Production / deploy (push) Has been skipped
Initial import of the public datacenter bingo site
The bingo card ran inside the asxpio container, dispatched by Host.
Give the public site its own repo, image and deploy so it can be
released and mirrored independently of asxp.io.

Editing stays in the asxp.io admin, which keeps owning the schema and
the photo pipeline; this app only reads the shared bingo tables and the
bingo/ photos, through a read-only DB role and MinIO user. Tests load a
snapshot of the asxpio-built schema (test/schema.sql).

Assisted-by: Claude:opus-5
2026-10-12 03:48:06 +04:00

14 lines
365 B
Ruby

require_relative 'app'
# www. redirects to the canonical BINGO_HOST; everything else is the card.
bingo_host = ENV['BINGO_HOST']
bingo = BingoWeb.new
run lambda { |env|
req = Rack::Request.new(env)
if bingo_host && req.host == "www.#{bingo_host}"
[301, { 'location' => "https://#{bingo_host}#{req.fullpath}" }, []]
else
bingo.call(env)
end
}