diff --git a/deployments/docker-compose/config/tokens.yaml b/deployments/docker-compose/config/tokens.yaml index ea8f8c7a3..447f3a84a 100644 --- a/deployments/docker-compose/config/tokens.yaml +++ b/deployments/docker-compose/config/tokens.yaml @@ -1,4 +1,4 @@ -- h0v0fixhkg9z4bgtxele7892x9sjtw7o: - sub: fc4c86cd-e4ff-463c-b0e4-36f34f795d7e - name: root - role: admin \ No newline at end of file +h0v0fixhkg9z4bgtxele7892x9sjtw7o: + sub: fc4c86cd-e4ff-463c-b0e4-36f34f795d7e + name: root + role: admin \ No newline at end of file diff --git a/deployments/docker-compose/docker-compose.yml b/deployments/docker-compose/docker-compose.yml index 82534295b..fd0c51ed8 100644 --- a/deployments/docker-compose/docker-compose.yml +++ b/deployments/docker-compose/docker-compose.yml @@ -6,16 +6,16 @@ services: - garnet_data:/data api: - #image: ghcr.io/serverlessworkflow/synapse/api - build: - context: ../../ - dockerfile: ./src/api/Synapse.Api.Server/Dockerfile + image: ghcr.io/serverlessworkflow/synapse/api + # build: + # context: ../../ + # dockerfile: ./src/api/Synapse.Api.Server/Dockerfile environment: CONNECTIONSTRINGS__REDIS: ${GARNET_URI} SYNAPSE_DASHBOARD_SERVE: true SYNAPSE_API_AUTH_TOKEN_FILE: /app/tokens.yaml volumes: - - /config/tokens.yaml:/app/tokens.yaml + - ./config/tokens.yaml:/app/tokens.yaml ports: - 8080:8080 depends_on: diff --git a/src/api/Synapse.Api.Server/Configuration/AuthenticationPolicyOptions.cs b/src/api/Synapse.Api.Server/Configuration/AuthenticationPolicyOptions.cs index 6790d8937..9a5b61a95 100644 --- a/src/api/Synapse.Api.Server/Configuration/AuthenticationPolicyOptions.cs +++ b/src/api/Synapse.Api.Server/Configuration/AuthenticationPolicyOptions.cs @@ -45,7 +45,6 @@ public AuthenticationPolicyOptions() this.Jwt ??= new(); this.Jwt.Audience = env; } - env = Environment.GetEnvironmentVariable(SynapseDefaults.EnvironmentVariables.Api.Authentication.Oidc.Authority); if (!string.IsNullOrWhiteSpace(env)) { diff --git a/src/api/Synapse.Api.Server/Program.cs b/src/api/Synapse.Api.Server/Program.cs index d855fff27..8997f5f86 100644 --- a/src/api/Synapse.Api.Server/Program.cs +++ b/src/api/Synapse.Api.Server/Program.cs @@ -12,7 +12,6 @@ // limitations under the License. using Microsoft.AspNetCore.Authentication.JwtBearer; -using Microsoft.AspNetCore.Builder; var builder = WebApplication.CreateBuilder(args); var applicationOptions = new ApiServerOptions(); @@ -141,9 +140,12 @@ }); app.MapControllers().RequireAuthorization(); app.MapHub("api/ws/resources/watch"); -app.MapFallbackToFile("index.html"); -app.MapFallbackToFile("/workflows/details/{namespace}/{name}/{version?}/{instanceName?}", "index.html"); - +if (options.ServeDashboard) +{ + app.MapFallbackToFile("index.html"); + app.MapFallbackToFile("/workflows/details/{namespace}/{name}/{version?}/{instanceName?}", "index.html"); +} + await app.RunAsync(); ///