From 37cef0a51d1846ec45813b7f8061556e4097846a Mon Sep 17 00:00:00 2001 From: yurvon-screamo Date: Tue, 20 Aug 2024 23:35:55 +0300 Subject: [PATCH] add ci --- README.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 67b7d04..02e435f 100644 --- a/README.md +++ b/README.md @@ -24,21 +24,29 @@ To run the mockup server as a Docker container: * Install [Docker](https://www.docker.com/get-started "https://www.docker.com/get-started"). -## Usage - -Configure: +## Configure * Edit [appsettings.json](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/servers/kestrel/endpoints?view=aspnetcore-8.0#configure-endpoints-in-appsettingsjson) and set target listen address:port (default `0.0.0.0:8080`). * Set "ContentRelativePath" variable to set redfish-mockup data directory (default - `content`). -Run application in debug: `dotnet run` +Or set in env appsettings values. + +## Running from Docker Image + +Run the container from image: + +```bash +docker run -p 8080:8080 -v /path/to/your/content:/app/content ghcr.io/yurvon-screamo/redfish-mockup-server:latest +``` + +## Build and run -Or build and run build: +Build and run build: * Build application: `dotnet publish "./dotnet-redfish.csproj" -c Release -o ../release /p:UseAppHost=true` * Run application: `../release/dotnet-redfish` -Or build and run docker image: +Build and run docker image: * Build image: `docker build -t dotnet-redfish .` * Run image: `docker run -p 8080:8080 -it dotnet-redfish`