Support local web activation over a restricted Unix socket
This commit is contained in:
1 parent
1fbe97d879
commit
7f706c39b5
6 files changed
+144
-2
No files matched your search
+3
-1
@@ -157,7 +157,9 @@ to Apache workers. The scheduler stores its state in a private directory and
|
||||
there is one scheduler for the installation.
|
||||
|
||||
```sh
|
||||
sudo install -m 0644 deploy/systemd/*.service /etc/systemd/system/
|
||||
sudo install -m 0644 deploy/systemd/coulobre-panel.service \
|
||||
deploy/systemd/coulobre-worker.service deploy/systemd/coulobre-beat.service \
|
||||
/etc/systemd/system/
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable --now coulobre-panel.service coulobre-worker.service coulobre-beat.service
|
||||
|
||||
|
||||
@@ -570,6 +570,28 @@ The status command reads local state. It exits with code 0 for `configured`,
|
||||
code 2 for the other report states, and code 1 if it cannot read the manifest
|
||||
or inspect the node. Use an HTTP request to verify the site's response as well.
|
||||
|
||||
### Enable local web activation
|
||||
|
||||
On a web node with the same Apache and PHP-FPM setup, systemd can accept local
|
||||
activation requests at `/run/coulobre-web-apply.sock`. Install the matching
|
||||
Coulobre package in a root-owned virtual environment at `/opt/coulobre` before
|
||||
enabling the socket.
|
||||
|
||||
```sh
|
||||
getent group coulobre-web-provisioning >/dev/null || sudo groupadd --system coulobre-web-provisioning
|
||||
sudo install -m 0644 deploy/systemd/coulobre-web-apply.socket \
|
||||
deploy/systemd/coulobre-web-apply@.service /etc/systemd/system/
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable --now coulobre-web-apply.socket
|
||||
```
|
||||
|
||||
Grant group membership only to the service identity responsible for provisioning
|
||||
sites. The socket accepts one version 1 site manifest as UTF-8 JSON, up to 4 KiB.
|
||||
After sending the manifest, shut down the writing half of the connection and
|
||||
read the JSON reply to EOF. A `configured` reply includes the account ID and
|
||||
domain. A `failed` reply includes a diagnostic in `problem`. Retry the same
|
||||
manifest if the connection closes before a reply arrives.
|
||||
|
||||
## Run an isolated PHP test site
|
||||
|
||||
Open a completed preview for the account's current domain and select **Download
|
||||
|
||||
Reference in new issue
Block a user