chore(ops): give the unprivileged instance its own proxy unit
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
79eb42b578
commit
9c3e33510d
4 files changed
+77
-42
No files matched your search
@@ -0,0 +1,28 @@
|
||||
# Proxy de l'instance Homarr non privilégiée.
|
||||
#
|
||||
# Séparé du service applicatif parce qu'il lui faut root — écouter le port 80 et
|
||||
# écrire dans /var/log/nginx — alors que l'application, elle, tourne sous
|
||||
# `homarr`. C'est la découpe qui permet à l'application de n'avoir aucun droit
|
||||
# particulier.
|
||||
#
|
||||
# À installer dans /etc/systemd/system/ :
|
||||
# sudo install -m 644 ops/homarr-dev-proxy.service /etc/systemd/system/
|
||||
# sudo install -m 644 ops/homarr-dev-proxy.nginx.conf /etc/nginx/
|
||||
# sudo systemctl daemon-reload && sudo systemctl enable --now homarr-dev-proxy
|
||||
|
||||
[Unit]
|
||||
Description=Homarr Dev reverse proxy
|
||||
After=network.target homarr-dev.service
|
||||
# Lié au service applicatif : le proxy seul n'a aucun sens, et le laisser
|
||||
# répondre alors que l'application est arrêtée ne servirait que des 502.
|
||||
PartOf=homarr-dev.service
|
||||
|
||||
[Service]
|
||||
Type=exec
|
||||
ExecStartPre=/usr/sbin/nginx -t -c /etc/nginx/homarr-dev-proxy.nginx.conf
|
||||
ExecStart=/usr/sbin/nginx -c /etc/nginx/homarr-dev-proxy.nginx.conf -g 'daemon off;'
|
||||
ExecReload=/usr/sbin/nginx -s reload
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in new issue
Block a user