[Unit]
Description=dms-ui · docker-mailserver web management
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=hermes
Group=hermes
WorkingDirectory=/home/hermes/dms-ui
Environment="PATH=/home/hermes/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
Environment="DMS_UI_BIND=127.0.0.1"
Environment="DMS_UI_PORT=8792"
Environment="DMS_UI_ADMIN_PASSWORD=admin"
Environment="DMS_UI_CONFIG=/home/hermes/dms-ui/config.json"
ExecStart=/home/hermes/venv/bin/python /home/hermes/dms-ui/app.py
Restart=on-failure
RestartSec=3
NoNewPrivileges=yes
ProtectSystem=full
ProtectHome=read-only
PrivateTmp=yes
ReadWritePaths=/home/hermes/dms-ui

[Install]
WantedBy=multi-user.target
