diff --git a/src/docker/Thinktecture.Relay.Connector.Docker/Dockerfile b/src/docker/Thinktecture.Relay.Connector.Docker/Dockerfile index 95c07e34a..7d3d13dbd 100644 --- a/src/docker/Thinktecture.Relay.Connector.Docker/Dockerfile +++ b/src/docker/Thinktecture.Relay.Connector.Docker/Dockerfile @@ -42,6 +42,6 @@ RUN chmod u-s /usr/bin/gpasswd /usr/bin/chsh /bin/umount /bin/mount /sbin/unix_c USER relay COPY --chown=relay --from=build /app . -ENV DOTNET_ENVIRONMENT=Development +ENV RelayConnector__Targets__httpbin__Url=http://relay-httpbin ENTRYPOINT ["dotnet", "Thinktecture.Relay.Connector.Docker.dll"] diff --git a/src/docker/Thinktecture.Relay.Connector.Docker/appsettings.Development.json b/src/docker/Thinktecture.Relay.Connector.Docker/appsettings.Development.json index 55e690631..24eb16909 100644 --- a/src/docker/Thinktecture.Relay.Connector.Docker/appsettings.Development.json +++ b/src/docker/Thinktecture.Relay.Connector.Docker/appsettings.Development.json @@ -18,73 +18,6 @@ }, "RelayConnector": { "RelayServerBaseUri": "http://localhost:5000", - "TenantName": "TestTenant1", - "TenantSecret": "", - "Targets": { - "mocky1": { - "Type": "RelayWebTarget", - "Timeout": "00:00:30", - "Comment": "returns simple JSON ({ \"Hello\": \"World\" }) (followed by '?mocky-delay=#ms' to simulate a long running request delayed by #)", - "Url": "https://run.mocky.io/v3/9c5f5b7f-a2ce-4067-8d0d-5130feb40e56" - }, - "mocky2": { - "Type": "RelayWebTarget", - "Timeout": "00:00:02", - "Comment": "returns HTTP status NO CONTENT (followed by '?mocky-delay=#ms' to simulate a long running request delayed by #)", - "Url": "https://run.mocky.io/v3/0e213019-ba0d-4cc9-adbb-bf00b95c98dc" - }, - "mocky3": { - "Type": "RelayWebTarget", - "Timeout": "00:00:02", - "Comment": "returns big JSON (about 2,4kb) (followed by '?mocky-delay=#ms' to simulate a long running request delayed by #)", - "Url": "https://run.mocky.io/v3/c20ff193-6b29-4b16-9552-512584914b72" - }, - "mocky4": { - "Type": "RelayWebTarget", - "Comment": "returns 307", - "Url": "https://run.mocky.io/v3/b1dff4cb-14ec-4b46-b841-708ab662411d" - }, - "status": { - "Type": "RelayWebTarget", - "Timeout": "00:00:02", - "Comment": "returns HTTP status by appended code (followed by '?sleep=#' to simulate a long running request delayed by # msec)", - "Url": "https://httpstat.us/" - }, - "swapi": { - "Type": "RelayWebTarget", - "Comment": "returns more complex JSON (e.g. '/api/people/1/')", - "Url": "https://swapi.dev/", - "Options": "FollowRedirect" - }, - "picsum": { - "Type": "RelayWebTarget", - "Comment": "returns a random 4k image", - "Url": "https://picsum.photos/3840/2160", - "Options": "FollowRedirect" - }, - "smallpdf": { - "Type": "RelayWebTarget", - "Timeout": "01:00:00", - "Comment": "returns a small pdf (around 10 Mb)", - "Url": "https://link.testfile.org/PDF10MB", - "Options": "FollowRedirect" - }, - "bigpdf": { - "Type": "RelayWebTarget", - "Timeout": "01:00:00", - "Comment": "returns a really big pdf (around 100 Mb)", - "Url": "https://link.testfile.org/PDF100MB", - "Options": "FollowRedirect" - }, - "tt": { - "Type": "RelayWebTarget", - "Url": "https://thinktecture.com", - "Options": "FollowRedirect" - }, - "lh": { - "Type": "RelayWebTarget", - "Url": "http://localhost:8080" - } - } + "TenantName": "TestTenant1" } } diff --git a/src/docker/Thinktecture.Relay.Connector.Docker/appsettings.json b/src/docker/Thinktecture.Relay.Connector.Docker/appsettings.json index 2c63c0851..4ee464c14 100644 --- a/src/docker/Thinktecture.Relay.Connector.Docker/appsettings.json +++ b/src/docker/Thinktecture.Relay.Connector.Docker/appsettings.json @@ -1,2 +1,43 @@ { + "RelayConnector": { + "TenantSecret": "", + "Targets": { + "status": { + "Type": "RelayWebTarget", + "Timeout": "00:00:02", + "Comment": "returns HTTP status by appended code (followed by '?sleep=#' to simulate a long running request delayed by # msec)", + "Url": "https://httpstat.us/" + }, + "swapi": { + "Type": "RelayWebTarget", + "Comment": "returns more complex JSON (e.g. '/api/people/1/')", + "Url": "https://swapi.dev/", + "Options": "FollowRedirect" + }, + "picsum": { + "Type": "RelayWebTarget", + "Comment": "returns a random 4k image", + "Url": "https://picsum.photos/3840/2160", + "Options": "FollowRedirect" + }, + "smallpdf": { + "Type": "RelayWebTarget", + "Timeout": "01:00:00", + "Comment": "returns a small pdf (around 10 Mb)", + "Url": "https://link.testfile.org/PDF10MB", + "Options": "FollowRedirect" + }, + "bigpdf": { + "Type": "RelayWebTarget", + "Timeout": "01:00:00", + "Comment": "returns a really big pdf (around 100 Mb)", + "Url": "https://link.testfile.org/PDF100MB", + "Options": "FollowRedirect" + }, + "httpbin": { + "Type": "RelayWebTarget", + "Url": "http://localhost:8080" + } + } + } } diff --git a/src/docker/docker-compose.yml b/src/docker/docker-compose.yml index c7e476087..62dda8c04 100644 --- a/src/docker/docker-compose.yml +++ b/src/docker/docker-compose.yml @@ -20,7 +20,7 @@ x-db-connection: &db-connection ConnectionStrings__SqlServer: Server=relay-persistence-sqlserver;Database=relayserver;User Id=sa;Password= x-logging: &logging - Serilog__MinimumLevel__Default: Verbose + Serilog__MinimumLevel__Default: Error Serilog__MinimumLevel__Override__Microsoft: Warning Serilog__MinimumLevel__Override__System: Warning Serilog__WriteTo__0__Name: Seq @@ -240,6 +240,14 @@ services: depends_on: - relay-connector-b1 + relay-httpbin: + <<: *defaults + image: kennethreitz/httpbin + container_name: relay-httpbin + platform: linux/amd64 + ports: + - "8080:80" + volumes: seq-data: postgresql-data: