Skip to content

Commit

Permalink
fix(DockerCompose): Fixed the docker-compose.yaml to properly mount t…
Browse files Browse the repository at this point in the history
…he tokens.yaml file
  • Loading branch information
cdavernas committed Aug 9, 2024
1 parent b63bea6 commit 9f26cda
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
8 changes: 4 additions & 4 deletions deployments/docker-compose/config/tokens.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
- h0v0fixhkg9z4bgtxele7892x9sjtw7o:
sub: fc4c86cd-e4ff-463c-b0e4-36f34f795d7e
name: root
role: admin
h0v0fixhkg9z4bgtxele7892x9sjtw7o:
sub: fc4c86cd-e4ff-463c-b0e4-36f34f795d7e
name: root
role: admin
10 changes: 5 additions & 5 deletions deployments/docker-compose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down
10 changes: 6 additions & 4 deletions src/api/Synapse.Api.Server/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -141,9 +140,12 @@
});
app.MapControllers().RequireAuthorization();
app.MapHub<ResourceEventWatchHub>("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();

/// <summary>
Expand Down

0 comments on commit 9f26cda

Please sign in to comment.