Add proper support for systemd

There wasn't a great way to start the gateway with systemd so that it can run in the background and be managed by systemd. This pr addeds a install sub command that decouples install from running. The goal was so you can run something like this in your IaC:

```infisical gateway install --token=<> --domain=<> && systemctl start infisical-gateway```
This commit is contained in:
Maidul Islam
2025-03-11 18:43:18 -04:00
parent 3986df8e8a
commit 159c27ac67
4 changed files with 55 additions and 24 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ After=network.target
[Service]
Type=simple
EnvironmentFile=/etc/infisical/gateway.conf
ExecStart=/usr/local/bin/infisical gateway
ExecStart=infisical gateway
Restart=on-failure
InaccessibleDirectories=/home
PrivateTmp=yes