This is a common scenario, and the intention of Quarkus's developer joy features is to allow it to work in a frictionless way, without requiring scripts or manual tunneling.
There are two options, although which one works best for you will depend a bit on how your company's remote podman is set up.
- Remote dev services. (When you run Quarkus in dev mode, the automatic provisioning of unconfigured services is called 'dev services'.) The idea here is that you use dev services normally, but under the covers, the container client is connecting to the remote instances. For Dev services, Testcontainers provides container connectivity under the covers. This should work transparently as long as
podman run
works. You'd set it up using something like
podman system connection add remote --identity ~/.ssh/my-key ssh://my-host/podman/podman.sock
podman system connection default remote
If you don't have a local podman
client, or if the podman connection settings don't sort it out, setting DOCKER_HOST
to the right remote socket will also tell Testcontainers where to look.
- Remote dev mode. Here, the whole application is running in a container on the remote server. Changes to your local files are reflected in the remote instance.
To use remote dev mode, you build a special jar and then launch it in the remote environment. Add the following to your application.properties
:
%dev.quarkus.package.type=mutable-jar
Then build the jar (they could be in the application.properties, but then you couldn't commit it to source control):
QUARKUS_LIVE-RELOAD_PASSWORD=<arbitrary password> ./mvnw install
The install will build you a normal fast-jar
dockerfile. Run it in your remote environment with QUARKUS_LAUNCH_DEVMODE=true
added to the podman run command.
Then, locally, instead of mvn quarkus:dev
, you'd run ./mvnw quarkus:remote-dev -Dquarkus.live-reload.url=http://my-remote-host:8080
https://quarkus.io/guides/maven-tooling#remote-development-mode has a more complete set of instructions. This option does have more moving parts and more latency, since you're transferring your whole application to the remote server every time code changes. So if you can, just configuring podman and using remote dev services is probably better.
A third option, which probably isn't relevant for you, is to use Testcontainers Cloud. Quarkus dev services use Testcontainers under the covers, and Testcontainers Cloud is a convenient way of running Testcontainers remotely.
quarkus dev
orquarkus test
? It will enter in Dev mode and then start all dev-service, right ? This is what I mean with "the same way". So, how can we hook up bat or cmd scripts to these two commands ? I managed a way to copy each dev ssh pub key to our podman server, so the ssh is not an issue anymore. – Rundle