Files
website/Dockerfile
Stan Runge 0fe0d36f87
All checks were successful
Deploy production / deploy (push) Successful in 1m15s
PUBG drop map: live squad map with WebSocket rooms
- 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
2026-10-25 22:46:30 +00:00

35 lines
1.4 KiB
Docker
Executable File

FROM oven/bun:1.4.4 AS builder
WORKDIR /app
COPY package.json bun.lock ./
RUN bun install --frozen-lockfile
COPY . .
RUN bun run test:unit -- --run
RUN bun run build
FROM oven/bun:1.4.4
WORKDIR /app
ARG GIT_SHA=dev
ENV APP_VERSION=$GIT_SHA
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/build ./build
COPY --from=builder /app/scripts ./scripts
COPY --from=builder /app/drizzle ./drizzle
COPY --from=builder /app/data ./data
COPY --from=builder /app/src/lib/server/db/schema ./src/lib/server/db/schema
COPY --from=builder /app/src/lib/cs-prices ./src/lib/cs-prices
# scripts/house-listing.ts (manual listings CLI) imports these pure helpers.
COPY --from=builder /app/src/lib/house-tracker ./src/lib/house-tracker
COPY --from=builder /app/src/lib/availability.ts ./src/lib/availability.ts
# scripts/music-*.ts (Spotify poll, Last.fm and streaming-history imports) import these.
COPY --from=builder /app/src/lib/music ./src/lib/music
# scripts/games-ingest.ts (match history backfills) imports the games ingest.
COPY --from=builder /app/src/lib/games-ingest ./src/lib/games-ingest
COPY --from=builder /app/server.js ./server.js
COPY package.json ./
EXPOSE 3000
ENV NODE_ENV=production
ENV BODY_SIZE_LIMIT=6M
# server.js wraps the adapter-bun build: same server, plus /ws/<channel> WebSockets and the
# PUBG map tiles (/pubg-tiles from the PUBG_TILES_ROOT bind mount, see scripts/deploy-remote.sh).
CMD ["bun", "./server.js"]