PUBG drop map: live squad map with WebSocket rooms
All checks were successful
Deploy production / deploy (push) Successful in 1m15s
All checks were successful
Deploy production / deploy (push) Successful in 1m15s
- server.js wraps Bun.serve to add /ws/<channel> upgrades (same server and port) and serve the map tiles from the host mount; Dockerfile now runs bun ./server.js - ws hub (channel registry, origin check) + pubg-map channel: rooms by unguessable code, validated + rate-limited messages, per-room write queue, presence - games.pubg_rooms / pubg_matches / pubg_markers; per-match sessions with history - /trackers/games/pubg/map hub (owner: rooms, landings over time, history) and /trackers/games/pubg/map/<code> fullscreen Leaflet map (all 11 maps) - deploy-remote.sh bind-mounts ~/pubg-maps; scripts/build-pubg-tiles.py rebuilds it
This commit is contained in:
37
drizzle/20261025223611_pubg_map/migration.sql
Normal file
37
drizzle/20261025223611_pubg_map/migration.sql
Normal file
@@ -0,0 +1,37 @@
|
||||
CREATE TABLE "games"."pubg_markers" (
|
||||
"id" text PRIMARY KEY,
|
||||
"match_id" integer NOT NULL,
|
||||
"kind" text NOT NULL,
|
||||
"x" double precision NOT NULL,
|
||||
"y" double precision NOT NULL,
|
||||
"x2" double precision,
|
||||
"y2" double precision,
|
||||
"label" text,
|
||||
"player" text NOT NULL,
|
||||
"color" text NOT NULL,
|
||||
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
||||
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE "games"."pubg_matches" (
|
||||
"id" serial PRIMARY KEY,
|
||||
"room_id" integer NOT NULL,
|
||||
"number" integer NOT NULL,
|
||||
"map" text NOT NULL,
|
||||
"started_at" timestamp with time zone DEFAULT now() NOT NULL,
|
||||
"ended_at" timestamp with time zone
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE TABLE "games"."pubg_rooms" (
|
||||
"id" serial PRIMARY KEY,
|
||||
"code" text NOT NULL UNIQUE,
|
||||
"name" text NOT NULL,
|
||||
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
||||
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
||||
);
|
||||
--> statement-breakpoint
|
||||
CREATE INDEX "pubg_markers_match_idx" ON "games"."pubg_markers" ("match_id");--> statement-breakpoint
|
||||
CREATE UNIQUE INDEX "pubg_matches_room_number_idx" ON "games"."pubg_matches" ("room_id","number");--> statement-breakpoint
|
||||
CREATE INDEX "pubg_matches_map_idx" ON "games"."pubg_matches" ("map","started_at");--> statement-breakpoint
|
||||
ALTER TABLE "games"."pubg_markers" ADD CONSTRAINT "pubg_markers_match_id_pubg_matches_id_fkey" FOREIGN KEY ("match_id") REFERENCES "games"."pubg_matches"("id") ON DELETE CASCADE;--> statement-breakpoint
|
||||
ALTER TABLE "games"."pubg_matches" ADD CONSTRAINT "pubg_matches_room_id_pubg_rooms_id_fkey" FOREIGN KEY ("room_id") REFERENCES "games"."pubg_rooms"("id") ON DELETE CASCADE;
|
||||
36138
drizzle/20261025223611_pubg_map/snapshot.json
Normal file
36138
drizzle/20261025223611_pubg_map/snapshot.json
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user