initial commit

This commit is contained in:
2026-07-14 21:31:59 -07:00
commit bd79966218
61 changed files with 19379 additions and 0 deletions
+34
View File
@@ -0,0 +1,34 @@
FROM node:22-bookworm-slim AS web-build
WORKDIR /app
COPY package.json package-lock.json ./
COPY apps/web/package.json apps/web/package.json
COPY packages/protocol/package.json packages/protocol/package.json
COPY packages/live-client/package.json packages/live-client/package.json
RUN npm ci --include-workspace-root
COPY apps/web apps/web
COPY packages/protocol packages/protocol
COPY packages/live-client packages/live-client
RUN npm --workspace @lxc/protocol run build && npm --workspace @lxc/live-client run build && npm --workspace @lxc/web run build
FROM rust:1.97-bookworm AS rust-build
RUN apt-get update && apt-get install -y --no-install-recommends pkg-config libssl-dev libasound2-dev && rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY apps/server-rust/Cargo.toml apps/server-rust/Cargo.lock ./apps/server-rust/
COPY vendor/blivedm ./vendor/blivedm
COPY apps/server-rust/src ./apps/server-rust/src
COPY apps/server/migrations ./apps/server/migrations
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/app/target-cache \
CARGO_TARGET_DIR=/app/target-cache cargo build --manifest-path apps/server-rust/Cargo.toml --release && \
cp /app/target-cache/release/lxc-stream-server /app/lxc-stream-server
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates libasound2 libssl3 && rm -rf /var/lib/apt/lists/*
WORKDIR /app
# The upstream client logs full upstream HTTP responses at INFO, which can include
# account metadata and short-lived connection tokens. Keep application lifecycle
# logs while suppressing dependency INFO output by default.
COPY --from=rust-build /app/lxc-stream-server /app/lxc-stream-server
COPY --from=web-build /app/apps/web/dist /app/web
EXPOSE 9719
CMD ["/app/lxc-stream-server", "--config", "/app/config.toml"]