ops/inf3r-web.service 2.0 KiB 45 lines Raw
1 # Keeps the daemon alive without a shell: the server is one process.2 [Unit]3 # Names the unit that an operator sees in a list or a journal header.4 Description=inf3r edge server5 # Starts after the network is up; the socket is a file, not a port.6 After=network.target7 8 # One process, not a forking daemon; systemd follows the server directly.9 [Service]10 # The server stays in the foreground and signals readiness on its own.11 Type=simple12 # The deploy file is the whole configuration; the operator owns it.13 ExecStart=/usr/local/bin/inf3r-web --deploy /etc/inf3r/deploy.toml14 # A dedicated account limits what a failed request can reach.15 User=inf3r16 # The same group owns the state directory and the socket.17 Group=inf3r18 # A crash restarts, because a model host should not stay down after a fault.19 Restart=on-failure20 # Two seconds keep a restart loop from flooding the journal.21 RestartSec=222 # A container bind needs Docker. The dedicated account cannot normally reach23 # the interactive user's rootless socket; use the compose control, a user unit24 # under the daemon user, or put DOCKER_HOST in this optional file and grant the25 # account access to that socket (an ACL or a matching group). The file is not26 # required, and `inf3r doctor` checks the deploy.27 EnvironmentFile=-/etc/inf3r/docker.env28 # A server never needs to gain privilege after it starts.29 NoNewPrivileges=yes30 # The filesystem is read-only except for the state path and the runtime socket31 # root below.32 ProtectSystem=strict33 # One private directory per plugin instance is created below /run/inf3r.34 RuntimeDirectory=inf3r35 RuntimeDirectoryMode=070036 # Models and deploy files live outside an operator's home.37 ProtectHome=yes38 # The ledger and the socket file are the only paths the server writes.39 ReadWritePaths=/var/lib/inf3r40 # Each job can hold several descriptors; the default limit is too low.41 LimitNOFILE=6553642 # The unit is enabled at boot after the operator has written the deploy file.43 [Install]44 # Starts with the normal multi-user boot.45 WantedBy=multi-user.target