diff --git a/Installation.md b/Installation.md index ad017fa..cdd1965 100644 --- a/Installation.md +++ b/Installation.md @@ -1,5 +1,132 @@ -* [Deploy with the prebuilt Docker image](https://github.com/gaseous-project/gaseous-server/wiki/Deploy-with-the-prebuilt-Docker-image) -* [Build and deploy a Docker image from source](https://github.com/gaseous-project/gaseous-server/wiki/Build-and-deploy-a-Docker-image-from-source) -* [Build and deploy from source](https://github.com/gaseous-project/gaseous-server/wiki/Build-and-deploy-from-source) - * [Updating from source](https://github.com/gaseous-project/gaseous-server/wiki/Updating-from-source) -* [Deploy to Unraid](https://github.com/gaseous-project/gaseous-server/wiki/Deploy-to-Unraid) \ No newline at end of file +# Deploy with the prebuilt Docker image + +Dockerfile and docker-compose.yml files have been provided to make deployment of the server as easy as possible. + +1. Download the docker-compose-{database}.yml file for the database type you would like to use. +2. Open the docker-compose.yml file and edit the igdbclientid and igdbclientsecret to the values retrieved from your IGDB account +3. Run the command ```docker-compose up -d``` +4. Connect to the host on port 5198 + +# Build and deploy a Docker image from source + +Dockerfile and docker-compose-build.yml files have been provided to make deployment of the server as easy as possible. + +1. Clone the repo with ```git clone https://github.com/gaseous-project/gaseous-server.git``` +2. Change into the gaseous-server directory +3. Open the docker-compose-{database}-build.yml file and edit the igdbclientid and igdbclientsecret to the values retrieved from your IGDB account +4. Run the command ```docker-compose --file docker-compose-{database}-build.yml up -d``` +5. Connect to the host on port 5198 + +# Build and deploy from source + +1. Install and configure a MariaDB or MySQL instance - this is beyond the scope of this document +2. Install the dotnet 7.0 packages appropriate for your operating system + * See: https://learn.microsoft.com/en-us/dotnet/core/install/linux +3. Create a database user with permission to create a databse. Gaseous will create the new database and apply the database schema on it's first startup. +4. Clone the repo with ```git clone https://github.com/gaseous-project/gaseous-server.git``` +5. Change into the gaseous-server directory +6. As the main branch is the development branch, you might want to change to a stable version - these are tagged with a version number. For example to change to the 1.5.0 release, use the command ```git checkout v1.5.0``` + * Check the releases page for the version you would like to run: https://github.com/gaseous-project/gaseous-server/releases +7. Download the emulator files from ```https://cdn.emulatorjs.org/releases/4.0.9.zip``` and extract the files to ```gaseous-server/wwwroot/emulators/EmulatorJS``` +8. Create a directory in the home directory of the user that will run the server. For example, if running as the user ```gaseous```, create the directory ```/home/gaseous/.gaseous-server``` +9. Change into the ```.gaseous-server``` directory created in the previous step +10. Copy the JSON from the config file above into a new file named ```config.json``` +11. Update the database section with the database server hostname, username, password, and port +12. Compile the server by changing back to the repo cloned earlier and executing: + * ```dotnet restore "gaseous-server/gaseous-server.csproj"``` + * ```dotnet publish "gaseous-server/gaseous-server.csproj" --use-current-runtime --self-contained false -c Release -o ``` + * replace `````` with the directory of your choosing. The compiled application will be copied there. For this example we'll use ```/opt/gaseous-server``` +13. The server can then be started by executing ```dotnet /opt/gaseous-server/gaseous-server.dll``` + * If you would like the server to run on a different ip address and port (for example 0.0.0.0:8080), add the --urls argument: ```dotnet /opt/gaseous-server/gaseous-server.dll --urls http://0.0.0.0:8080``` + +**Note**: The above instructions were tested on macOS Ventura, and Ubuntu 22.04.3. There was a report that Debian 11 had an issue with the git submodule commands (see: https://github.com/gaseous-project/gaseous-server/issues/71). This was possibly due to an older git package. + +## Updating from source + +1. Stop the server +2. Switch to the source directory +3. Update your repo: + * If running from the main branch, run ```git pull``` to update the repo + * If running from another branch or tag, run: + * ```git fetch``` + * ```git checkout ``` +4. Run steps 12 and 13 from the above Build guide + +# Deploy to Unraid + +These steps describe a FRESH INSTALL. REMOVE ANY OLD CONTAINERS AND old APPDATA if you had any other attempts. + +1. Copy the following into a file named ``gsdb.xml`` +```xml + + + gsdb + mariadb + https://hub.docker.com/r/gaseousgames/gaseousserver/ + gaseous + + sh + false + + https://github.com/gaseous-project/gaseous-server?ref=selfh.st + 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. PART2 +THIS IS THE Data Base, you also need the FRONTEND!!!! + Cloud: GameServers: + + + https://i.imgur.com/A1X3Gcf.png + + + + 1706104502 + + + + /mnt/user/appdata/gaseous/database + gaseous + gaseous + gaseous + +``` + +2. Copy the following into a file named ``gaseous.xml`` +```xml + + + gaseous-server + gaseousgames/gaseousserver:v1.7.0-preview.8 + https://hub.docker.com/r/gaseousgames/gaseousserver/ + gaseous + + sh + false + + https://github.com/gaseous-project/gaseous-server?ref=selfh.st + 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. PART 1 +You also need the DataBase. + GameServers: + http://[IP]:[PORT:5198] + + https://i.imgur.com/A1X3Gcf.png + + + + 1706105663 + + + YOU NEED THE DATABASE GaseousDB + /mnt/user/appdata/gaseous/data + 5198 + clientid + clientsecret + gsdb + root + gaseous + +``` + +3. In unraid terminal paste: ``docker network create gaseous`` +4. In Main -> BootDevice -> config -> plugins -> dockerMan -> templates-user click UPLOAD (at the bottom) then select the two .xml files +5. In Docker click ADD CONTAINER, select a template, make one of the Gaseous. Click APPLY. Repeat for the other one. + +![gas](https://github.com/gaseous-project/gaseous-server/assets/84688932/9aa65ca0-c216-47a2-b759-761e0edeb5ed)