From 5020064298f6519157f44737f338e7ab0f94ab43 Mon Sep 17 00:00:00 2001 From: Kacper Donat Date: Sat, 18 Jul 2020 15:47:31 +0200 Subject: [PATCH 1/3] Update 'src/InternshipSystem.Api/Startup.cs' --- src/InternshipSystem.Api/Startup.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/InternshipSystem.Api/Startup.cs b/src/InternshipSystem.Api/Startup.cs index be7ab2e..2608009 100644 --- a/src/InternshipSystem.Api/Startup.cs +++ b/src/InternshipSystem.Api/Startup.cs @@ -42,7 +42,7 @@ namespace InternshipSystem.Api app .UseSwagger() - .UseSwaggerUI(options => options.SwaggerEndpoint("/swagger/v1/swagger.json", "InternshipSystem Api")) + .UseSwaggerUI(options => options.SwaggerEndpoint("/api/swagger/v1/swagger.json", "InternshipSystem Api")) .UseHttpsRedirection() .UseRouting() .UseAuthorization() -- 2.45.2 From 9b63f8ac413152ec9cde28076e020f091234e7e2 Mon Sep 17 00:00:00 2001 From: Kacper Donat Date: Sat, 18 Jul 2020 16:02:49 +0200 Subject: [PATCH 2/3] Update '.build/deploy.sh' --- .build/deploy.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.build/deploy.sh b/.build/deploy.sh index fdd9a59..4986990 100755 --- a/.build/deploy.sh +++ b/.build/deploy.sh @@ -2,8 +2,8 @@ BUILD_PATH=$1 cd $BUILD_PATH/src || exit 1 -docker-build -f ./InternshipSystem.Api/Dockerfile -t internship.api . +docker build -f ./InternshipSystem.Api/Dockerfile -t internship.api . cd $BUILD_PATH/.docker || exit 1 -docker-compose up -d --force-recreate \ No newline at end of file +docker-compose up -d --build --force-recreate \ No newline at end of file -- 2.45.2 From f5f9a3c309aaeccd60bd1c01f7c6b972207e1fee Mon Sep 17 00:00:00 2001 From: MaxchilKH Date: Sat, 18 Jul 2020 16:44:59 +0200 Subject: [PATCH 3/3] Api prefix from env --- .docker/docker-compose.yaml | 2 +- src/InternshipSystem.Api/Startup.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.docker/docker-compose.yaml b/.docker/docker-compose.yaml index 214b576..fc4967b 100644 --- a/.docker/docker-compose.yaml +++ b/.docker/docker-compose.yaml @@ -6,6 +6,7 @@ services: environment: CONNECTIONSTRINGS__INTERNSHIPDATABASE: "Host=db.postgres;Port=5432;Database=postgres;Username=postgres;Password=szwoniu" ASPNETCORE_ENVIRONMENT: Development + APIPREFIX: /api depends_on: - db.postgres ports: @@ -19,4 +20,3 @@ services: PGDATA: /postgres ports: - 5432:5432 - \ No newline at end of file diff --git a/src/InternshipSystem.Api/Startup.cs b/src/InternshipSystem.Api/Startup.cs index 2608009..aa5f0c8 100644 --- a/src/InternshipSystem.Api/Startup.cs +++ b/src/InternshipSystem.Api/Startup.cs @@ -42,7 +42,7 @@ namespace InternshipSystem.Api app .UseSwagger() - .UseSwaggerUI(options => options.SwaggerEndpoint("/api/swagger/v1/swagger.json", "InternshipSystem Api")) + .UseSwaggerUI(options => options.SwaggerEndpoint(Path.Join(Configuration.GetValue("ApiPrefix"), "/swagger/v1/swagger.json"), "InternshipSystem Api")) .UseHttpsRedirection() .UseRouting() .UseAuthorization() -- 2.45.2