From 73174a30f0b56384b0580b858085c096ad99839b Mon Sep 17 00:00:00 2001 From: Michael Green <84688932+michael-j-green@users.noreply.github.com> Date: Wed, 7 Feb 2024 22:29:05 +1100 Subject: [PATCH] Integrated EJS 4.0.11 * Integrated EJS 4.0.11 --- .devcontainer/.env | 4 +++ .devcontainer/Dockerfile | 6 ++++ .devcontainer/devcontainer.json | 46 ++++++++++++++++++++++++++++ .devcontainer/docker-compose.yml | 23 ++++++++++++++ .github/dependabot.yml | 4 +++ Dockerfile | 4 +-- README.MD | 1 + gaseous-server/gaseous-server.csproj | 4 +-- 8 files changed, 88 insertions(+), 4 deletions(-) create mode 100644 .devcontainer/.env create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/docker-compose.yml diff --git a/.devcontainer/.env b/.devcontainer/.env new file mode 100644 index 0000000..a86b76c --- /dev/null +++ b/.devcontainer/.env @@ -0,0 +1,4 @@ +DATABASE_HOST=mariadb +DATABASE_USER=root +DATABASE_PASSWORD=gaseous +DATABASE_DB=gaseous \ No newline at end of file diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..02815be --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,6 @@ +FROM mcr.microsoft.com/devcontainers/dotnet:1-8.0-bookworm + +RUN apt-get update && apt-get install -y p7zip-full +RUN mkdir -p /workspace/gaseous-server/wwwroot/emulators/EmulatorJS +RUN wget https://cdn.emulatorjs.org/releases/4.0.11.7z +RUN 7z x -y -o/workspace/gaseous-server/wwwroot/emulators/EmulatorJS 4.0.11.7z \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..2607853 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,46 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet +{ + "name": "C# (.NET)", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + //"image": "mcr.microsoft.com/devcontainers/dotnet:1-8.0-bookworm", + "dockerComposeFile": "docker-compose.yml", + "service": "development", + "workspaceFolder": "/workspace", + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + "forwardPorts": [5198], + "portsAttributes": { + "5198": { + "protocol": "http" + } + }, + + // Use 'postCreateCommand' to run commands after the container is created. + "postCreateCommand": "dotnet restore", + + // Configure tool-specific properties. + "customizations": { + "vscode": { + "extensions": [ + "cweijan.vscode-mysql-client2", + "ms-dotnettools.csdevkit", + "ms-dotnettools.csharp", + "ms-dotnettools.vscode-dotnet-runtime", + "ecmel.vscode-html-css", + "github.vscode-github-actions", + "GitHub.vscode-pull-request-github", + "AndersEAndersen.html-class-suggestions", + "george-alisson.html-preview-vscode", + "ms-dotnettools.vscodeintellicode-csharp", + "Zignd.html-css-class-completion" + ] + } + } + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml new file mode 100644 index 0000000..30d0972 --- /dev/null +++ b/.devcontainer/docker-compose.yml @@ -0,0 +1,23 @@ +services: + development: + build: + context: . + dockerfile: Dockerfile + volumes: + - ..:/workspace + stdin_open: true + environment: + - TZ=Australia/Sydney + - dbhost=${DATABASE_HOST} + - dbuser=${DATABASE_USER} + - dbpass=${DATABASE_PASSWORD} + - igdbclientid= + - igdbclientsecret= + mariadb: + hostname: mariadb + image: mariadb:latest + environment: + - MARIADB_ROOT_PASSWORD=${DATABASE_PASSWORD} + - MARIADB_DATABASE=${DATABASE_DB} + - MARIADB_USER=${DATABASE_USER} + - MARIADB_PASSWORD=${DATABASE_PASSWORD} \ No newline at end of file diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 8c23067..d16b92a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,3 +9,7 @@ updates: directory: "/" # Location of package manifests schedule: interval: "weekly" + - package-ecosystem: "devcontainers" + directory: "/" + schedule: + interval: "weekly" diff --git a/Dockerfile b/Dockerfile index 8cd2ecc..7db4a87 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,8 +17,8 @@ RUN dotnet publish "gaseous-server/gaseous-server.csproj" --use-current-runtime # download and unzip EmulatorJS from CDN RUN apt-get update && apt-get install -y p7zip-full RUN mkdir -p out/wwwroot/emulators/EmulatorJS -RUN wget https://cdn.emulatorjs.org/releases/4.0.10.7z -RUN 7z x -y -oout/wwwroot/emulators/EmulatorJS 4.0.10.7z +RUN wget https://cdn.emulatorjs.org/releases/4.0.11.7z +RUN 7z x -y -oout/wwwroot/emulators/EmulatorJS 4.0.11.7z # Build runtime image FROM mcr.microsoft.com/dotnet/aspnet:8.0 diff --git a/README.MD b/README.MD index 28b0976..112cb08 100644 --- a/README.MD +++ b/README.MD @@ -1,3 +1,4 @@ +[![.NET](https://github.com/gaseous-project/gaseous-server/actions/workflows/dotnet.yml/badge.svg)](https://github.com/gaseous-project/gaseous-server/actions/workflows/dotnet.yml) [![CodeQL](https://github.com/gaseous-project/gaseous-server/actions/workflows/codeql.yml/badge.svg)](https://github.com/gaseous-project/gaseous-server/actions/workflows/codeql.yml) [![Build Release Docker Image](https://github.com/gaseous-project/gaseous-server/actions/workflows/BuildDockerOnTag-Release.yml/badge.svg)](https://github.com/gaseous-project/gaseous-server/actions/workflows/BuildDockerOnTag-Release.yml) # Gaseous Server This is the server for the Gaseous system. It offers ROM and title management, as well as some basic in browser emulation of those ROMs. diff --git a/gaseous-server/gaseous-server.csproj b/gaseous-server/gaseous-server.csproj index 032b733..2bb2bb1 100644 --- a/gaseous-server/gaseous-server.csproj +++ b/gaseous-server/gaseous-server.csproj @@ -9,11 +9,11 @@ 4 - bin\Debug\net7.0\gaseous-server.xml + bin\Debug\net8.0\gaseous-server.xml 4 - bin\Release\net7.0\gaseous-server.xml + bin\Release\net8.0\gaseous-server.xml