diff --git a/.dockerignore b/.dockerignore index 2773103..4aa5c48 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,8 +1,42 @@ -.git -input -output -target +# os-specific stuff +.DS_Store +Thumbs.db +desktop.ini + +# code editors +.vscode/ + +# git & docs +.git/ +.github/ +docs/ +LICENSE +.gitignore +.gitattributes +*.md + +# docker +.dockerignore +docker-compose.yml +Dockerfile + +# environment variables +*.env* + +# vertd folders +permanent/ +input/ +output/ + +# rust output +target/ + +# ffmpeg ffmpeg.exe ffmpeg ffprobe.exe -ffprobe \ No newline at end of file +ffprobe + +# nix stuff +flake.nix +flake.lock \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index a7028e0..b8e0f77 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,6 +20,7 @@ COPY --from=builder /build/target/release/vertd ./vertd # https://github.com/NVIDIA/nvidia-container-toolkit/issues/140#issuecomment-1927273909 RUN apt-get update && apt-get install -y \ + curl \ ffmpeg \ mesa-va-drivers \ intel-media-va-driver \ @@ -37,4 +38,9 @@ RUN rm -rf \ /var/lib/apt/lists/* \ /var/tmp/* +EXPOSE 24153/tcp + +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ + CMD sh -c "curl --fail --silent --output /dev/null http://localhost:${PORT:-24153}/api/version || exit 1" + ENTRYPOINT ["./vertd"] diff --git a/docker-compose.yml b/docker-compose.yml index bd7c79f..82f2067 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,15 +1,15 @@ services: vertd: - build: . + container_name: vertd image: ghcr.io/vert-sh/vertd:latest + build: . environment: - - PORT=${PORT:-24153} - WEBHOOK_URL=${WEBHOOK_URL} - WEBHOOK_PINGS=${WEBHOOK_PINGS} - ADMIN_PASSWORD=${ADMIN_PASSWORD} - PUBLIC_URL=${PUBLIC_URL} ports: - - "${PORT:-24153}:${PORT:-24153}" + - "${PORT:-24153}:24153" # For AMD/Intel GPUs, uncomment the "devices" section - then remove # or comment out the "deploy" section and the "runtime" string used diff --git a/docs/GETTING_STARTED.md b/docs/GETTING_STARTED.md index ec0fec7..8aafb42 100644 --- a/docs/GETTING_STARTED.md +++ b/docs/GETTING_STARTED.md @@ -10,6 +10,7 @@ This file covers how to get started with `vertd`. - [Arch Linux](#arch-linux) - [Fedora](#fedora) - [Downloading the server binaries](#downloading-the-server-binaries) +- [Running `vertd` on Windows](#running-vertd-on-windows) - [Running `vertd` on macOS/Linux](#running-vertd-on-macoslinux) - [Using systemd](#using-systemd) - [Using Docker](#using-docker) @@ -78,6 +79,13 @@ Grab the latest `vertd` release for your operating system and architecture from > [!NOTE] > If you're using an Intel-based Mac, download the `vertd-mac-x86_64` executable. For Mac computers with Apple silicon (M1 or newer), download `vertd-mac-arm64` instead. +## Running `vertd` on Windows + +Simply navigate to the directory where you downloaded the server binary, then open it like any other program. + +> [!IMPORTANT] +> It's very likely you will get a SmartScreen pop-up on Windows. You can ignore it by pressing `More info` and then `Run anyway`. However, if you don't trust the file, you can always inspect and compile the code yourself. + ## Running `vertd` on macOS/Linux Assuming you downloaded the `vertd` executable to your Downloads folder, open the Terminal and run the following command to navigate there: @@ -179,4 +187,4 @@ You can set the `VERTD_FORCE_GPU` environment variable with your vendor type (`n ```shell $ VERTD_FORCE_GPU=intel ./vertd -``` \ No newline at end of file +``` diff --git a/src/http/services/websocket.rs b/src/http/services/websocket.rs index 90f41fa..649e877 100644 --- a/src/http/services/websocket.rs +++ b/src/http/services/websocket.rs @@ -270,9 +270,15 @@ pub async fn websocket(req: HttpRequest, stream: web::Payload) -> Result