bingo: move the public site to the datacenterbingo repo
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:
parent
510998c0ed
commit
849980042e
19 changed files with 34 additions and 1007 deletions
20
config.ru
20
config.ru
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue