Here is the updated service file talking to a PostgreSQL-server and external Keycloak service.
---------------------------------------------------------------------------------------- [Unit] Description=Nikita Noark 5 service interface After=network.target nss-user-lookup.target nslcd.service
[Install] WantedBy=multi-user.target
[Service] User=ark-nikita-t ExecStart=java -jar -Dspring.jpa.show-sql=false -Dspring.main.banner-mode=off \ -Dnikita.startup.base-directory=/opt/nikita/storage \ -Dspring.security.oauth2.client.provider.keycloak.issuer-uri=https://<redacted>/realms/<redacted> \ -Dspring.security.oauth2.client.registration.keycloak.client-id=<redacted> \ -Dspring.profiles.active=postgres \ -Dspring.datasource.url=jdbc:postgresql://<redacted>/<redacted> \ -Dspring.datasource.username=<redacted> \ -Dspring.datasource.password=<redacted> \ /opt/nikita/target/nikita-noark5-core-0.7.jar Type=simple Restart=on-failure TimeoutStartSec=infinity ----------------------------------------------------------------------------------------
I tried adding these options to enable SQL statement logging and avoid erasing the database on restart, but it did not work. Not quite sure why. Thomas, any idea?
-Dspring.jpa.show-sql=true -Dspring.jpa.properties.hibernate.hbm2ddl.auto=validate