[Unit]
Description=KCG Monitoring Backend
After=network.target

[Service]
Type=simple
User=root
Group=root
WorkingDirectory=/devdata/services/kcg/backend
EnvironmentFile=-/devdata/services/kcg/backend/.env
ExecStart=/usr/lib/jvm/java-21-openjdk-21.0.10.0.7-1.el9.x86_64/bin/java \
    -Xms2g -Xmx4g \
    -Dspring.profiles.active=prod \
    -jar /devdata/services/kcg/backend/kcg.jar

Restart=on-failure
RestartSec=10
TimeoutStopSec=30

StandardOutput=journal
StandardError=journal
SyslogIdentifier=kcg-backend

[Install]
WantedBy=multi-user.target
