[Unit]
Description=Presense
PartOf=podman.service
Wants=network-online.target podman-conf-login.service
After=podman.service network-online.target podman-conf-login.service
StartLimitIntervalSec=0

[Container]
Image=presense-go:latest
ContainerName=presense
PodmanArgs=-a stdout -a stderr
Network=sandbox.network
PublishPort=127.0.0.1:1902:8080
Environment=HTTP_HOST_PATH=0.0.0.0:8080
Environment=HTTPWS_HOST_PATH=0.0.0.0:8088
Environment=MQTT_HOST=emqx:1883
Environment=MQTT_USERNAME=sandbox
Environment=MQTT_PASSWORD=sandbox2025
Environment=MQTT_CLIENT_ID=presence-detector
Environment=DB_PATH=.presence.db

[Service]
Restart=always
TimeoutStartSec=infinity
RestartSec=5

[Install]
WantedBy=multi-user.target podman.service