feat(web): add client-aware playback and reproducible UI (#433)
## Summary
- add a versioned playback client profile for browser/runtime protocol,
container, codec, header, proxy, insecure-media, and P2P-loader
capabilities
- generate compatible direct and proxy resources inside each provider
and return a structured incompatibility error when route policy leaves
no viable result
- force provider proxy delivery for browser-forbidden headers, including
affected Bilibili variants, while preserving explicit direct-only
failures
- keep legacy clients compatible and isolate capability-aware playback
cache entries
- serve `/oauth2/callback` through the same Flutter SPA entry point and
keep public discovery anonymous
## Reproducible Web UI
- move Flutter acquisition/build, source configuration, asset manifests,
Brotli/gzip compression, and compile-time embedding into the independent
`synctv-web-ui` crate
- support prebuilt distributions, local projects, and Git sources pinned
to an immutable full commit, with an ignored local override
- fingerprint source, Flutter version, build arguments, dart-defines,
builder generation, output, and compression settings
- validate cached Git repository/revision/commit identity, support
offline cache reuse, and rebuild only when relevant inputs change
- pin and checksum the Flutter SDK in the Docker Web asset stage;
backend-only builds require no Flutter, Git fetch, or network
- serve embedded assets with ETags, compression negotiation, CSP, cache
policy, Origin/CORS handling, and SPA fallback outside API/media routes
## Verification
- `cargo fmt --all -- --check`
- workspace `cargo check`, test/doc-test, and all-targets Clippy with
warnings denied
- provider tests: 200 passed, 1 ignored
- OAuth core/API tests: 72 + 16 passed
- `synctv-web-ui`: 10 passed
- `synctv-api-http --features web-ui`: 12 passed
- default Git source cold build from the pinned App commit, followed by
offline hot-cache reuse in about 1.1 seconds
- `cargo check -p synctv --features web-ui` and `docker buildx build
--check .`
- real Chrome playback, P2P, OAuth/Casdoor, multi-user sync, chat,
media, playlist, upload, settings, and playback-history flows
Companion frontend PR: https://github.com/synctv-org/synctv-app/pull/52
Release pin validation:
https://github.com/synctv-org/synctv-release/pull/9
1 month ago
|
|
|
# Stage 1: Build the backend for the target platform.
|
|
|
|
|
FROM rust:slim-trixie AS builder
|
|
|
|
|
|
|
|
|
|
# Install build dependencies
|
|
|
|
|
# protobuf-compiler is shared by workspace and dependency build scripts
|
|
|
|
|
# build-essential, perl, cmake needed for vendored builds (xiu/opus dependencies)
|
|
|
|
|
# curl needed for utoipa-swagger-ui to download assets
|
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
|
protobuf-compiler \
|
|
|
|
|
pkg-config \
|
|
|
|
|
build-essential \
|
feat(web): add client-aware playback and reproducible UI (#433)
## Summary
- add a versioned playback client profile for browser/runtime protocol,
container, codec, header, proxy, insecure-media, and P2P-loader
capabilities
- generate compatible direct and proxy resources inside each provider
and return a structured incompatibility error when route policy leaves
no viable result
- force provider proxy delivery for browser-forbidden headers, including
affected Bilibili variants, while preserving explicit direct-only
failures
- keep legacy clients compatible and isolate capability-aware playback
cache entries
- serve `/oauth2/callback` through the same Flutter SPA entry point and
keep public discovery anonymous
## Reproducible Web UI
- move Flutter acquisition/build, source configuration, asset manifests,
Brotli/gzip compression, and compile-time embedding into the independent
`synctv-web-ui` crate
- support prebuilt distributions, local projects, and Git sources pinned
to an immutable full commit, with an ignored local override
- fingerprint source, Flutter version, build arguments, dart-defines,
builder generation, output, and compression settings
- validate cached Git repository/revision/commit identity, support
offline cache reuse, and rebuild only when relevant inputs change
- pin and checksum the Flutter SDK in the Docker Web asset stage;
backend-only builds require no Flutter, Git fetch, or network
- serve embedded assets with ETags, compression negotiation, CSP, cache
policy, Origin/CORS handling, and SPA fallback outside API/media routes
## Verification
- `cargo fmt --all -- --check`
- workspace `cargo check`, test/doc-test, and all-targets Clippy with
warnings denied
- provider tests: 200 passed, 1 ignored
- OAuth core/API tests: 72 + 16 passed
- `synctv-web-ui`: 10 passed
- `synctv-api-http --features web-ui`: 12 passed
- default Git source cold build from the pinned App commit, followed by
offline hot-cache reuse in about 1.1 seconds
- `cargo check -p synctv --features web-ui` and `docker buildx build
--check .`
- real Chrome playback, P2P, OAuth/Casdoor, multi-user sync, chat,
media, playlist, upload, settings, and playback-history flows
Companion frontend PR: https://github.com/synctv-org/synctv-app/pull/52
Release pin validation:
https://github.com/synctv-org/synctv-release/pull/9
1 month ago
|
|
|
lld \
|
|
|
|
|
libclang-dev \
|
|
|
|
|
nasm \
|
|
|
|
|
cmake \
|
|
|
|
|
curl \
|
feat(web): add client-aware playback and reproducible UI (#433)
## Summary
- add a versioned playback client profile for browser/runtime protocol,
container, codec, header, proxy, insecure-media, and P2P-loader
capabilities
- generate compatible direct and proxy resources inside each provider
and return a structured incompatibility error when route policy leaves
no viable result
- force provider proxy delivery for browser-forbidden headers, including
affected Bilibili variants, while preserving explicit direct-only
failures
- keep legacy clients compatible and isolate capability-aware playback
cache entries
- serve `/oauth2/callback` through the same Flutter SPA entry point and
keep public discovery anonymous
## Reproducible Web UI
- move Flutter acquisition/build, source configuration, asset manifests,
Brotli/gzip compression, and compile-time embedding into the independent
`synctv-web-ui` crate
- support prebuilt distributions, local projects, and Git sources pinned
to an immutable full commit, with an ignored local override
- fingerprint source, Flutter version, build arguments, dart-defines,
builder generation, output, and compression settings
- validate cached Git repository/revision/commit identity, support
offline cache reuse, and rebuild only when relevant inputs change
- pin and checksum the Flutter SDK in the Docker Web asset stage;
backend-only builds require no Flutter, Git fetch, or network
- serve embedded assets with ETags, compression negotiation, CSP, cache
policy, Origin/CORS handling, and SPA fallback outside API/media routes
## Verification
- `cargo fmt --all -- --check`
- workspace `cargo check`, test/doc-test, and all-targets Clippy with
warnings denied
- provider tests: 200 passed, 1 ignored
- OAuth core/API tests: 72 + 16 passed
- `synctv-web-ui`: 10 passed
- `synctv-api-http --features web-ui`: 12 passed
- default Git source cold build from the pinned App commit, followed by
offline hot-cache reuse in about 1.1 seconds
- `cargo check -p synctv --features web-ui` and `docker buildx build
--check .`
- real Chrome playback, P2P, OAuth/Casdoor, multi-user sync, chat,
media, playlist, upload, settings, and playback-history flows
Companion frontend PR: https://github.com/synctv-org/synctv-app/pull/52
Release pin validation:
https://github.com/synctv-org/synctv-release/pull/9
1 month ago
|
|
|
unzip \
|
|
|
|
|
perl \
|
|
|
|
|
perl-modules-5.40 && rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
|
|
# Set working directory
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
# Compile SQLx query macros from checked-in .sqlx metadata instead of requiring
|
|
|
|
|
# a build-time database connection.
|
|
|
|
|
ENV SQLX_OFFLINE=true
|
|
|
|
|
|
|
|
|
|
# Container images include Kubernetes integration, mimalloc, and OpenAPI in
|
|
|
|
|
# addition to the crate defaults. Override SYNCTV_BUILD_FEATURES to customize
|
|
|
|
|
# this set.
|
|
|
|
|
# Set SYNCTV_BUILD_NO_DEFAULT_FEATURES=true plus SYNCTV_BUILD_FEATURES for a
|
|
|
|
|
# fully explicit feature set.
|
|
|
|
|
ARG SYNCTV_BUILD_NO_DEFAULT_FEATURES=false
|
|
|
|
|
ARG SYNCTV_BUILD_FEATURES="k8s,mimalloc,openapi"
|
|
|
|
|
ARG SYNCTV_CARGO_BUILD_ARGS=""
|
|
|
|
|
ARG SYNCTV_CARGO_BUILD_PROFILE=release
|
feat(web): add client-aware playback and reproducible UI (#433)
## Summary
- add a versioned playback client profile for browser/runtime protocol,
container, codec, header, proxy, insecure-media, and P2P-loader
capabilities
- generate compatible direct and proxy resources inside each provider
and return a structured incompatibility error when route policy leaves
no viable result
- force provider proxy delivery for browser-forbidden headers, including
affected Bilibili variants, while preserving explicit direct-only
failures
- keep legacy clients compatible and isolate capability-aware playback
cache entries
- serve `/oauth2/callback` through the same Flutter SPA entry point and
keep public discovery anonymous
## Reproducible Web UI
- move Flutter acquisition/build, source configuration, asset manifests,
Brotli/gzip compression, and compile-time embedding into the independent
`synctv-web-ui` crate
- support prebuilt distributions, local projects, and Git sources pinned
to an immutable full commit, with an ignored local override
- fingerprint source, Flutter version, build arguments, dart-defines,
builder generation, output, and compression settings
- validate cached Git repository/revision/commit identity, support
offline cache reuse, and rebuild only when relevant inputs change
- pin and checksum the Flutter SDK in the Docker Web asset stage;
backend-only builds require no Flutter, Git fetch, or network
- serve embedded assets with ETags, compression negotiation, CSP, cache
policy, Origin/CORS handling, and SPA fallback outside API/media routes
## Verification
- `cargo fmt --all -- --check`
- workspace `cargo check`, test/doc-test, and all-targets Clippy with
warnings denied
- provider tests: 200 passed, 1 ignored
- OAuth core/API tests: 72 + 16 passed
- `synctv-web-ui`: 10 passed
- `synctv-api-http --features web-ui`: 12 passed
- default Git source cold build from the pinned App commit, followed by
offline hot-cache reuse in about 1.1 seconds
- `cargo check -p synctv --features web-ui` and `docker buildx build
--check .`
- real Chrome playback, P2P, OAuth/Casdoor, multi-user sync, chat,
media, playlist, upload, settings, and playback-history flows
Companion frontend PR: https://github.com/synctv-org/synctv-app/pull/52
Release pin validation:
https://github.com/synctv-org/synctv-release/pull/9
1 month ago
|
|
|
ARG SYNCTV_WEB_ARTIFACT_URL=""
|
|
|
|
|
ARG SYNCTV_WEB_ARTIFACT_DIGEST=""
|
|
|
|
|
ARG CARGO_INCREMENTAL=0
|
|
|
|
|
ARG CARGO_TERM_COLOR="auto"
|
|
|
|
|
ARG TARGETARCH
|
|
|
|
|
|
|
|
|
|
# Clean CI runners benefit from deterministic non-incremental compilation.
|
|
|
|
|
ENV CARGO_INCREMENTAL=$CARGO_INCREMENTAL
|
|
|
|
|
ENV CARGO_TERM_COLOR=$CARGO_TERM_COLOR
|
|
|
|
|
|
|
|
|
|
# Copy entire source tree
|
|
|
|
|
COPY . .
|
|
|
|
|
|
feat(web): add client-aware playback and reproducible UI (#433)
## Summary
- add a versioned playback client profile for browser/runtime protocol,
container, codec, header, proxy, insecure-media, and P2P-loader
capabilities
- generate compatible direct and proxy resources inside each provider
and return a structured incompatibility error when route policy leaves
no viable result
- force provider proxy delivery for browser-forbidden headers, including
affected Bilibili variants, while preserving explicit direct-only
failures
- keep legacy clients compatible and isolate capability-aware playback
cache entries
- serve `/oauth2/callback` through the same Flutter SPA entry point and
keep public discovery anonymous
## Reproducible Web UI
- move Flutter acquisition/build, source configuration, asset manifests,
Brotli/gzip compression, and compile-time embedding into the independent
`synctv-web-ui` crate
- support prebuilt distributions, local projects, and Git sources pinned
to an immutable full commit, with an ignored local override
- fingerprint source, Flutter version, build arguments, dart-defines,
builder generation, output, and compression settings
- validate cached Git repository/revision/commit identity, support
offline cache reuse, and rebuild only when relevant inputs change
- pin and checksum the Flutter SDK in the Docker Web asset stage;
backend-only builds require no Flutter, Git fetch, or network
- serve embedded assets with ETags, compression negotiation, CSP, cache
policy, Origin/CORS handling, and SPA fallback outside API/media routes
## Verification
- `cargo fmt --all -- --check`
- workspace `cargo check`, test/doc-test, and all-targets Clippy with
warnings denied
- provider tests: 200 passed, 1 ignored
- OAuth core/API tests: 72 + 16 passed
- `synctv-web-ui`: 10 passed
- `synctv-api-http --features web-ui`: 12 passed
- default Git source cold build from the pinned App commit, followed by
offline hot-cache reuse in about 1.1 seconds
- `cargo check -p synctv --features web-ui` and `docker buildx build
--check .`
- real Chrome playback, P2P, OAuth/Casdoor, multi-user sync, chat,
media, playlist, upload, settings, and playback-history flows
Companion frontend PR: https://github.com/synctv-org/synctv-app/pull/52
Release pin validation:
https://github.com/synctv-org/synctv-release/pull/9
1 month ago
|
|
|
# CI passes a prebuilt Web distribution. Local builds use synctv-web-ui/dist.
|
|
|
|
|
RUN --mount=type=secret,id=GIT_AUTH_TOKEN \
|
|
|
|
|
if [ -n "$SYNCTV_WEB_ARTIFACT_URL" ]; then \
|
|
|
|
|
test -s /run/secrets/GIT_AUTH_TOKEN || { \
|
|
|
|
|
echo "GIT_AUTH_TOKEN is required to download the Web UI artifact" >&2; \
|
|
|
|
|
exit 1; \
|
|
|
|
|
}; \
|
|
|
|
|
[ "${#SYNCTV_WEB_ARTIFACT_DIGEST}" -eq 64 ] && \
|
|
|
|
|
case "$SYNCTV_WEB_ARTIFACT_DIGEST" in \
|
|
|
|
|
*[!0-9a-f]*) false ;; \
|
|
|
|
|
*) true ;; \
|
|
|
|
|
esac || { \
|
|
|
|
|
echo "SYNCTV_WEB_ARTIFACT_DIGEST must be a lowercase SHA-256 digest" >&2; \
|
|
|
|
|
exit 1; \
|
|
|
|
|
}; \
|
|
|
|
|
curl --fail --location --retry 3 --retry-all-errors \
|
|
|
|
|
--header "Accept: application/vnd.github+json" \
|
|
|
|
|
--header "Authorization: Bearer $(cat /run/secrets/GIT_AUTH_TOKEN)" \
|
|
|
|
|
--header "X-GitHub-Api-Version: 2022-11-28" \
|
|
|
|
|
--output /tmp/synctv-web-ui.zip \
|
|
|
|
|
"$SYNCTV_WEB_ARTIFACT_URL"; \
|
|
|
|
|
echo "$SYNCTV_WEB_ARTIFACT_DIGEST /tmp/synctv-web-ui.zip" | sha256sum --check -; \
|
|
|
|
|
find synctv-web-ui/dist -mindepth 1 -delete; \
|
|
|
|
|
unzip -q /tmp/synctv-web-ui.zip -d synctv-web-ui/dist; \
|
|
|
|
|
rm /tmp/synctv-web-ui.zip; \
|
|
|
|
|
test -f synctv-web-ui/dist/index.html; \
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
# Build with cache mounts for cargo registry, git deps, and target directory
|
|
|
|
|
# Copy binary out of cache mount before RUN completes
|
|
|
|
|
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
|
|
|
|
--mount=type=cache,target=/usr/local/cargo/git \
|
feat(web): add client-aware playback and reproducible UI (#433)
## Summary
- add a versioned playback client profile for browser/runtime protocol,
container, codec, header, proxy, insecure-media, and P2P-loader
capabilities
- generate compatible direct and proxy resources inside each provider
and return a structured incompatibility error when route policy leaves
no viable result
- force provider proxy delivery for browser-forbidden headers, including
affected Bilibili variants, while preserving explicit direct-only
failures
- keep legacy clients compatible and isolate capability-aware playback
cache entries
- serve `/oauth2/callback` through the same Flutter SPA entry point and
keep public discovery anonymous
## Reproducible Web UI
- move Flutter acquisition/build, source configuration, asset manifests,
Brotli/gzip compression, and compile-time embedding into the independent
`synctv-web-ui` crate
- support prebuilt distributions, local projects, and Git sources pinned
to an immutable full commit, with an ignored local override
- fingerprint source, Flutter version, build arguments, dart-defines,
builder generation, output, and compression settings
- validate cached Git repository/revision/commit identity, support
offline cache reuse, and rebuild only when relevant inputs change
- pin and checksum the Flutter SDK in the Docker Web asset stage;
backend-only builds require no Flutter, Git fetch, or network
- serve embedded assets with ETags, compression negotiation, CSP, cache
policy, Origin/CORS handling, and SPA fallback outside API/media routes
## Verification
- `cargo fmt --all -- --check`
- workspace `cargo check`, test/doc-test, and all-targets Clippy with
warnings denied
- provider tests: 200 passed, 1 ignored
- OAuth core/API tests: 72 + 16 passed
- `synctv-web-ui`: 10 passed
- `synctv-api-http --features web-ui`: 12 passed
- default Git source cold build from the pinned App commit, followed by
offline hot-cache reuse in about 1.1 seconds
- `cargo check -p synctv --features web-ui` and `docker buildx build
--check .`
- real Chrome playback, P2P, OAuth/Casdoor, multi-user sync, chat,
media, playlist, upload, settings, and playback-history flows
Companion frontend PR: https://github.com/synctv-org/synctv-app/pull/52
Release pin validation:
https://github.com/synctv-org/synctv-release/pull/9
1 month ago
|
|
|
--mount=type=cache,id=synctv-rustup-${TARGETARCH},target=/usr/local/rustup,sharing=locked \
|
|
|
|
|
--mount=type=cache,id=synctv-target-${SYNCTV_CARGO_BUILD_PROFILE}-${TARGETARCH},target=/app/target,sharing=locked \
|
|
|
|
|
case "$SYNCTV_CARGO_BUILD_PROFILE" in \
|
|
|
|
|
dev) target_profile_dir=debug ;; \
|
|
|
|
|
release) target_profile_dir=release ;; \
|
|
|
|
|
*) echo "Unsupported SYNCTV_CARGO_BUILD_PROFILE: $SYNCTV_CARGO_BUILD_PROFILE" >&2; exit 1 ;; \
|
|
|
|
|
esac; \
|
|
|
|
|
build_flags="--profile $SYNCTV_CARGO_BUILD_PROFILE"; \
|
|
|
|
|
if [ -n "$SYNCTV_CARGO_BUILD_ARGS" ]; then \
|
|
|
|
|
build_flags="$build_flags $SYNCTV_CARGO_BUILD_ARGS"; \
|
|
|
|
|
fi; \
|
|
|
|
|
if [ "$SYNCTV_BUILD_NO_DEFAULT_FEATURES" = "true" ]; then \
|
|
|
|
|
build_flags="$build_flags --no-default-features"; \
|
|
|
|
|
fi; \
|
|
|
|
|
if [ -n "$SYNCTV_BUILD_FEATURES" ]; then \
|
|
|
|
|
build_flags="$build_flags --features $SYNCTV_BUILD_FEATURES"; \
|
|
|
|
|
fi; \
|
feat(web): add client-aware playback and reproducible UI (#433)
## Summary
- add a versioned playback client profile for browser/runtime protocol,
container, codec, header, proxy, insecure-media, and P2P-loader
capabilities
- generate compatible direct and proxy resources inside each provider
and return a structured incompatibility error when route policy leaves
no viable result
- force provider proxy delivery for browser-forbidden headers, including
affected Bilibili variants, while preserving explicit direct-only
failures
- keep legacy clients compatible and isolate capability-aware playback
cache entries
- serve `/oauth2/callback` through the same Flutter SPA entry point and
keep public discovery anonymous
## Reproducible Web UI
- move Flutter acquisition/build, source configuration, asset manifests,
Brotli/gzip compression, and compile-time embedding into the independent
`synctv-web-ui` crate
- support prebuilt distributions, local projects, and Git sources pinned
to an immutable full commit, with an ignored local override
- fingerprint source, Flutter version, build arguments, dart-defines,
builder generation, output, and compression settings
- validate cached Git repository/revision/commit identity, support
offline cache reuse, and rebuild only when relevant inputs change
- pin and checksum the Flutter SDK in the Docker Web asset stage;
backend-only builds require no Flutter, Git fetch, or network
- serve embedded assets with ETags, compression negotiation, CSP, cache
policy, Origin/CORS handling, and SPA fallback outside API/media routes
## Verification
- `cargo fmt --all -- --check`
- workspace `cargo check`, test/doc-test, and all-targets Clippy with
warnings denied
- provider tests: 200 passed, 1 ignored
- OAuth core/API tests: 72 + 16 passed
- `synctv-web-ui`: 10 passed
- `synctv-api-http --features web-ui`: 12 passed
- default Git source cold build from the pinned App commit, followed by
offline hot-cache reuse in about 1.1 seconds
- `cargo check -p synctv --features web-ui` and `docker buildx build
--check .`
- real Chrome playback, P2P, OAuth/Casdoor, multi-user sync, chat,
media, playlist, upload, settings, and playback-history flows
Companion frontend PR: https://github.com/synctv-org/synctv-app/pull/52
Release pin validation:
https://github.com/synctv-org/synctv-release/pull/9
1 month ago
|
|
|
RUSTFLAGS="-Clink-arg=-fuse-ld=lld -Clink-arg=-Wl,-z,pack-relative-relocs" \
|
|
|
|
|
cargo \
|
|
|
|
|
build $build_flags \
|
|
|
|
|
--bin synctv && \
|
|
|
|
|
cp "target/$target_profile_dir/synctv" /synctv
|
|
|
|
|
|
|
|
|
|
# Stage 2: Runtime image
|
|
|
|
|
FROM debian:trixie-slim
|
|
|
|
|
|
|
|
|
|
# OCI image labels
|
|
|
|
|
LABEL org.opencontainers.image.title="SyncTV" \
|
|
|
|
|
org.opencontainers.image.description="Distributed video synchronization platform with real-time streaming" \
|
|
|
|
|
org.opencontainers.image.url="https://github.com/synctv-org/synctv" \
|
|
|
|
|
org.opencontainers.image.source="https://github.com/synctv-org/synctv" \
|
|
|
|
|
org.opencontainers.image.licenses="MIT"
|
|
|
|
|
|
|
|
|
|
# Install runtime dependencies (curl needed for healthcheck)
|
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
|
|
|
ca-certificates \
|
|
|
|
|
curl && rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
|
|
# Create synctv for running the application
|
|
|
|
|
RUN useradd -m -u 1000 synctv
|
|
|
|
|
|
|
|
|
|
# Create necessary directories
|
|
|
|
|
RUN mkdir -p /app /app/keys /app/config /data /run/synctv
|
|
|
|
|
|
|
|
|
|
RUN chown -R synctv:synctv /app /data /run/synctv
|
|
|
|
|
|
|
|
|
|
# Set working directory
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
|
|
# Install the CLI in the standard executable search path.
|
|
|
|
|
COPY --from=builder /synctv /usr/local/bin/synctv
|
|
|
|
|
|
|
|
|
|
# Switch to non-root user
|
|
|
|
|
USER synctv
|
|
|
|
|
|
|
|
|
|
# Verify PATH resolution and runtime dependencies using the production user.
|
|
|
|
|
RUN command -v synctv && synctv --version
|
|
|
|
|
|
|
|
|
|
# Expose ports
|
|
|
|
|
# 8080: HTTP API + public gRPC (also serves HLS via /api/room/movie/live/hls/*)
|
|
|
|
|
# 8081: internal health endpoints (liveness and readiness)
|
|
|
|
|
# 50051: dedicated cluster gRPC
|
|
|
|
|
# 9090: internal Prometheus metrics listener
|
|
|
|
|
# 1935: RTMP (livestream)
|
|
|
|
|
EXPOSE 8080 8081 50051 9090 1935
|
|
|
|
|
|
|
|
|
|
# Health check against the HTTP health endpoint
|
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=30s --retries=3 \
|
|
|
|
|
CMD ["curl", "-f", "http://localhost:8081/health/ready"]
|
|
|
|
|
|
|
|
|
|
# Run the application
|
|
|
|
|
ENTRYPOINT ["synctv"]
|
|
|
|
|
|
|
|
|
|
CMD ["serve"]
|