Aggiunge registry nodi stream e provisioning Hetzner/lab per lo scale-out.
Prepara l'architettura multi-nodo (MediaMTX+ffmpeg) con assignment URL per sessione, admin di provision/drain e provider Cloud/DNS astratti verso mltv-stream.net. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class CreateStreamNodes < ActiveRecord::Migration[7.2]
|
||||
def change
|
||||
create_table :stream_nodes, id: :uuid, default: -> { "gen_random_uuid()" } do |t|
|
||||
t.string :slug, null: false
|
||||
t.string :hostname, null: false
|
||||
t.string :role, null: false, default: "home"
|
||||
t.string :status, null: false, default: "ready"
|
||||
t.string :rtmp_base_url, null: false
|
||||
t.string :hls_base_url, null: false
|
||||
t.string :api_base_url, null: false
|
||||
t.string :internal_rtmp_url
|
||||
t.string :internal_hls_url
|
||||
t.integer :max_publishers, null: false, default: 6
|
||||
t.integer :max_relays, null: false, default: 6
|
||||
t.string :provider, null: false, default: "local"
|
||||
t.string :provider_instance_id
|
||||
t.datetime :last_health_at
|
||||
t.jsonb :metadata, null: false, default: {}
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
add_index :stream_nodes, :slug, unique: true
|
||||
add_index :stream_nodes, :status
|
||||
add_index :stream_nodes, :role
|
||||
|
||||
add_reference :stream_sessions, :stream_node, type: :uuid, foreign_key: true, null: true, index: true
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user