[Unit]
Description=P5G Marvis container
After=docker.service network-online.target
Requires=docker.service

[Service]
Type=simple
Restart=always
RestartSec=5
TimeoutStartSec=0

ExecStartPre=-/usr/bin/docker rm -f p5g-marvis
ExecStart=/usr/bin/docker run \
  --name p5g-marvis \
  --publish 127.0.0.1:8100:8100 \
  --env MARVIS_PROMETHEUS_URL=http://127.0.0.1:9090 \
  --env MARVIS_PROMETHEUS_PREFIX=/prometheus \
  --env MARVIS_ALERTMANAGER_URL=http://127.0.0.1:9093 \
  --env MARVIS_AI_MODE=rule \
  p5g-marvis:latest
ExecStop=/usr/bin/docker stop p5g-marvis

[Install]
WantedBy=multi-user.target
