[Unit]
Description=Minecraft Proxy Velocity via Podman managed by Systemd
Documentation=https://docs.papermc.io/velocity/

[Container]
Image=git.nanody.de/anonoe/jre-alpine:latest
AutoUpdate=registry
PublishPort=25565:25565/tcp
PublishPort=24454:24454/udp
UserNS=keep-id
Mount=type=bind,src=PATH/TO/velocity,dst=/mnt/server
WorkingDir=/mnt/server
PodmanArgs=--tty --interactive
Exec=java -Xms500M -Xmx500M -XX:+UseG1GC -XX:G1HeapRegionSize=4M -XX:+UnlockExperimentalVMOptions -XX:+ParallelRefProcEnabled -XX:+AlwaysPreTouch -XX:MaxInlineLevel=15 -jar velocity.jar

[Service]
SuccessExitStatus=0 143
TimeoutStartSec=480
TimeoutStopSec=480

[Install]
# Start by default on boot
WantedBy=default.target
