diff --git a/docs/modules/ROOT/pages/dev-services.adoc b/docs/modules/ROOT/pages/dev-services.adoc index c5cc3e8f6..090a472b0 100644 --- a/docs/modules/ROOT/pages/dev-services.adoc +++ b/docs/modules/ROOT/pages/dev-services.adoc @@ -61,6 +61,24 @@ The key is the name of the service to enable and must be a valid LocalStack serv Some extensions support additional configuration to be applied at startup. Refer to the extension documentation. +== Connect to host network + +Dev Services for Amazon Services can support communication from the localstack container to the host network. + +If the container needs to communicate with the application running in dev mode, the property `quarkus.http.host` must be set to make the application listen on `0.0.0.0`. +Otherwise, network traffic must be forwarded somehow to `127.0.0.1` which is the default listening address. + +By default, the host exposes port `8080` or the one set via `quarkus.http.port` property to the LocalStack container. +In case the exposed port is incorrectly evaluated, it can be manually forced by specifying the desired value via `quarkus.aws.devservices.localstack.host-port`. + +[source, properties] +---- +quarkus.http.host=0.0.0.0 +quarkus.aws.devservices.localstack.access-to-host=true +---- + +Connection to host network DOES NOT support `quarkus.http.port=0` + == Cognito The Cognito extension is not using LocalStack but Moto. diff --git a/docs/modules/ROOT/pages/includes/quarkus-aws-devservices-localstack-local-stack-dev-services-build-time-config.adoc b/docs/modules/ROOT/pages/includes/quarkus-aws-devservices-localstack-local-stack-dev-services-build-time-config.adoc index 24338c7d4..e4e012e7e 100644 --- a/docs/modules/ROOT/pages/includes/quarkus-aws-devservices-localstack-local-stack-dev-services-build-time-config.adoc +++ b/docs/modules/ROOT/pages/includes/quarkus-aws-devservices-localstack-local-stack-dev-services-build-time-config.adoc @@ -95,6 +95,40 @@ endif::add-copy-button-to-env-var[] | +a|icon:lock[title=Fixed at build time] [[quarkus-aws-devservices-localstack-local-stack-dev-services-build-time-config_quarkus-aws-devservices-localstack-access-to-host]]`link:#quarkus-aws-devservices-localstack-local-stack-dev-services-build-time-config_quarkus-aws-devservices-localstack-access-to-host[quarkus.aws.devservices.localstack.access-to-host]` + + +[.description] +-- +Indicates if the container would make a connection to the host network. + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_AWS_DEVSERVICES_LOCALSTACK_ACCESS_TO_HOST+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_AWS_DEVSERVICES_LOCALSTACK_ACCESS_TO_HOST+++` +endif::add-copy-button-to-env-var[] +--|boolean +|`false` + + +a|icon:lock[title=Fixed at build time] [[quarkus-aws-devservices-localstack-local-stack-dev-services-build-time-config_quarkus-aws-devservices-localstack-host-port]]`link:#quarkus-aws-devservices-localstack-local-stack-dev-services-build-time-config_quarkus-aws-devservices-localstack-host-port[quarkus.aws.devservices.localstack.host-port]` + + +[.description] +-- +port which the application listen to. + +ifdef::add-copy-button-to-env-var[] +Environment variable: env_var_with_copy_button:+++QUARKUS_AWS_DEVSERVICES_LOCALSTACK_HOST_PORT+++[] +endif::add-copy-button-to-env-var[] +ifndef::add-copy-button-to-env-var[] +Environment variable: `+++QUARKUS_AWS_DEVSERVICES_LOCALSTACK_HOST_PORT+++` +endif::add-copy-button-to-env-var[] +--|int +|`${quarkus.http.port:8080}` + + a|icon:lock[title=Fixed at build time] [[quarkus-aws-devservices-localstack-local-stack-dev-services-build-time-config_quarkus-aws-devservices-localstack-container-properties-container-properties]]`link:#quarkus-aws-devservices-localstack-local-stack-dev-services-build-time-config_quarkus-aws-devservices-localstack-container-properties-container-properties[quarkus.aws.devservices.localstack.container-properties]`