All checks were successful
Deploy production / deploy (push) Successful in 1m26s
39 lines
1.7 KiB
Docker
Executable File
39 lines
1.7 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
|
|
# scripts/ai-*-import.ts (AI tracker news and bot status imports) import this.
|
|
COPY --from=builder /app/src/lib/server/ai-import.ts ./src/lib/server/ai-import.ts
|
|
# scripts/radio.ts (ISS passes and ntfy reminders) imports the radio helpers.
|
|
COPY --from=builder /app/src/lib/radio ./src/lib/radio
|
|
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"]
|