Skip to content

Commit

Permalink
doc: add host networking section
Browse files Browse the repository at this point in the history
  • Loading branch information
dabg3 committed Mar 28, 2024
1 parent 415ea0e commit f7acfee
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
18 changes: 18 additions & 0 deletions docs/modules/ROOT/pages/dev-services.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]`


Expand Down

0 comments on commit f7acfee

Please sign in to comment.