bingo: move the public site to the datacenterbingo repo
All checks were successful
Build and Deploy to Production / test (push) Successful in 25s
Build and Deploy to Production / build (push) Successful in 1m2s
Build and Deploy to Production / deploy (push) Successful in 38s

The public card now runs from its own repo and container, with a
Traefik router of its own. Drop BingoWeb, its views, icons, Host
dispatch and the asxpio-bingo router here; keep the admin, the schema
and the photo pipeline, which the new site reads through a read-only
role.

BINGO_HOST stays for IndexNow pings and the admin's site link.

Assisted-by: Claude:opus-5
This commit is contained in:
Sergei Poljanski 2026-10-12 03:52:30 +04:00
commit 849980042e
Signed by: asxpi
GPG key ID: 4F8851660FA4121B
19 changed files with 34 additions and 1007 deletions

View file

@ -1,20 +1,6 @@
require 'sinatra/base'
require './asxpio.rb'
require './bingo_web.rb'
# One process, two sites: the bingo hosts get BingoWeb, everything else
# asxp.io. BINGO_HOST is canonical (www. redirects to it); BINGO_ALT_HOST
# serves the same card, e.g. while the canonical domain's DNS settles.
asxpio = AsxpioWeb.new
bingo = BingoWeb.new
bingo_host = ENV['BINGO_HOST']
bingo_hosts = BingoWeb::HOSTS
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_hosts.include?(req.host) ? bingo : asxpio).call(env)
end
}
# The public bingo site moved to its own repo/container (datacenterbingo);
# only its admin (/admin/bingo) is still served here.
run AsxpioWeb.new