diff --git a/Wave/Dockerfile b/Wave/Dockerfile index 5588412..3be05ed 100644 --- a/Wave/Dockerfile +++ b/Wave/Dockerfile @@ -5,6 +5,7 @@ USER app WORKDIR /app RUN mkdir ./files && chown app ./files VOLUME /app/files +VOLUME /configuration EXPOSE 8080 FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build diff --git a/Wave/Program.cs b/Wave/Program.cs index 33abb25..e4632ba 100644 --- a/Wave/Program.cs +++ b/Wave/Program.cs @@ -9,7 +9,10 @@ using Wave.Services; var builder = WebApplication.CreateBuilder(args); -builder.Configuration.AddEnvironmentVariables("WAVE_"); +builder.Configuration + .AddEnvironmentVariables("WAVE_") + .AddJsonFile("/configuration/config.json", true, false) + .AddYamlFile("/configuration/config.yml", true, false); builder.Services.AddRazorComponents().AddInteractiveServerComponents(); builder.Services.AddControllers(); diff --git a/Wave/Wave.csproj b/Wave/Wave.csproj index 85353bb..4fc765a 100644 --- a/Wave/Wave.csproj +++ b/Wave/Wave.csproj @@ -22,6 +22,7 @@ + diff --git a/docker-compose.yml b/docker-compose.yml index 19db5f8..a3c4b7c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,6 +16,7 @@ services: - "WAVE_ConnectionStrings__DefaultConnection=Host=db; Username=wave; Password=development" volumes: - wave-files:/app/files + - wave-config:/configuration networks: - wave database: @@ -32,6 +33,7 @@ services: volumes: wave-files: + wave-config: wave-db: networks: wave: \ No newline at end of file