From 5ff7c17daf706250ff6052cfd3de2e946a8e6e00 Mon Sep 17 00:00:00 2001 From: JPVenson Date: Sat, 6 Jan 2024 22:35:15 +0200 Subject: [PATCH] Feature/enable gh codespaces (#10324) * Added BindAll network Manager * Updated docs * Update ApplicationHost.cs resolved merge conflicts * Fixed merge issues * Updated Dev container to dotnet * Update Emby.Server.Implementations/ApplicationHost.cs Co-authored-by: Cody Robibero * Updates container to include dependencies * Resolved merge conflicts * Updated container config to automate setup more * Updated readme * Enabled auto loading of extensions * fixed recommended list not parsable * Removed obsolete code * Reverted change to virtualize GetAllBindInterfaces * Updated Readme * Update devcontainer.json --------- Co-authored-by: Cody Robibero --- .devcontainer/devcontainer.json | 28 ++++++++++++++++++++++++++++ .vscode/extensions.json | 10 ++++------ README.md | 11 +++++++++++ 3 files changed, 43 insertions(+), 6 deletions(-) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000000..063901c800 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,28 @@ +{ + "name": "Development Jellyfin Server", + "image":"mcr.microsoft.com/devcontainers/dotnet:8.0-jammy", + // restores nuget packages, installs the dotnet workloads and installs the dev https certificate + "postStartCommand": "dotnet restore; dotnet workload update; dotnet dev-certs https --trust", + // reads the extensions list and installs them + "postAttachCommand": "cat .vscode/extensions.json | jq -r .recommendations[] | xargs -n 1 code --install-extension", + "features": { + "ghcr.io/devcontainers/features/dotnet:2": { + "version": "none", + "dotnetRuntimeVersions": "8.0", + "aspNetCoreRuntimeVersions": "8.0" + }, + "ghcr.io/devcontainers-contrib/features/apt-packages:1": { + "preserve_apt_list": false, + "packages": ["libfontconfig1"] + }, + "ghcr.io/devcontainers/features/docker-in-docker:2": { + "dockerDashComposeVersion": "v2" + }, + "ghcr.io/devcontainers/features/github-cli:1": {}, + "ghcr.io/eitsupi/devcontainer-features/jq-likes:2": {} + }, + "hostRequirements": { + "memory": "8gb", + "cpus": 4 + } +} diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 59d9452fed..d738e9fba4 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,13 +1,11 @@ { - // See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. - // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp - - // List of extensions which should be recommended for users of this workspace. "recommendations": [ "ms-dotnettools.csharp", - "editorconfig.editorconfig" + "editorconfig.editorconfig", + "GitHub.vscode-github-actions", + "ms-dotnettools.vscode-dotnet-runtime", + "ms-dotnettools.csdevkit" ], - // List of extensions recommended by VS Code that should not be recommended for users of this workspace. "unwantedRecommendations": [ ] diff --git a/README.md b/README.md index 15dd0ae679..62ef21334d 100644 --- a/README.md +++ b/README.md @@ -142,6 +142,17 @@ cd Jellyfin.Server/bin/Debug/net8.0 # Change into the build output directory 2. Execute the build output. On Linux, Mac, etc. use `./jellyfin` and on Windows use `jellyfin.exe`. +### Running from GH-Codespaces + +As Jellyfin will run on a container on a github hosted server, JF needs to handle some things differently. +**NOTE:** If you want to access the JF instance from outside, like with a WebClient on another PC, remember to set the "ports" in the lower VsCode window to public. + +#### FFmpeg installation. +Because sometimes you need FFMPEG to test certain cases, follow the instructions from the wiki on the dev enviorment: +https://jellyfin.org/docs/general/installation/linux/#ffmpeg-installation + +**NOTE:** When first opening the server instance with any WebUI, you will be send to the login instead of the setup page. Refresh the login page once and you should be redirected to the Setup. + ### Running The Tests This repository also includes unit tests that are used to validate functionality as part of a CI pipeline on Azure. There are several ways to run these tests.