0

I created a native-image following the tutorial "https://quarkus.io/guides/building-native-image"

installed and configured: Apache Maven 3.8.6 Podman GraalVM libz-dev zlib1g-dev

created the native-image

/home/xpto/getting-started/target/getting-started-1.0.0-SNAPSHOT-runner

questions:

what's the best way to install native-image, i.e. getting-started-1.0.0-SNAPSHOT-runner, as a service on linux
without using docker or postman as containers

what are the alternatives?

my idea would be to create a "systemd start-stop-script", but I have doubts about creating the shell script, how to do it?

Create a systemd start-stop-script in: /usr/lib/systemd/system named: mycustomquarkus service

------------------------------------
[Unit]
Description=mycustomquarkus service
After=network.service

[Service]
ExecStart=/???.sh start
PIDFile=/var/run/???.pid

[Install]
WantedBy=multi-user.target
------------------------------------
cealex
  • 173
  • 7
  • 1
    I'm no systemd expert, but I believe you don't really need a start-stop script. The `ExecStart` configuration property can just directly point to the native binary, `getting-started-1.0.0-SNAPSHOT-runner`. Quarkus applications don't create a PID file, so you could just remove `PIDFile` altogether, and I believe it should work. – Ladicek Nov 25 '22 at 11:11
  • https://stackoverflow.com/a/38818264/175554 may help – ozkanpakdil Nov 26 '22 at 01:31
  • https://github.com/quarkiverse/quarkus-systemd-notify – Eng.Fouad Apr 10 '23 at 18:10

0 Answers0