path
This commit is contained in:
parent
3ac11468a1
commit
79b3c8d693
5 changed files with 6 additions and 30 deletions
14
README.md
14
README.md
|
|
@ -38,10 +38,6 @@ Important:
|
|||
- `X-authentik-email`
|
||||
- `FORGEJO_BASE_URL` + `FORGEJO_TOKEN` enable repository creation.
|
||||
- `FORGEJO_ORG` switches creation from personal repos to org repos.
|
||||
- `PROJECTS_ROOT` supports templates:
|
||||
- `$HOME` = workspace unix user home
|
||||
- `$app` = project slug
|
||||
- Example: `$HOME/projects/$app`
|
||||
- `UNIX_SOCKET_PATH` enables unix socket listener in addition to `LISTEN_ADDR`.
|
||||
- `CADDY_ROUTE_ENABLED=true` enables route provisioning.
|
||||
- `CADDY_ADMIN_URL` points to the Caddy Admin API (default `http://localhost:2019`).
|
||||
|
|
@ -83,9 +79,9 @@ Route shape:
|
|||
- If auto-provisioning cannot apply (for example external non-Forgejo repo), configure a webhook manually to call `webhook_url`.
|
||||
- Deploy runs only when payload `ref` equals `refs/heads/main`.
|
||||
- Deploy behavior:
|
||||
1. Clone repo to `<PROJECTS_ROOT>/repo` if missing.
|
||||
1. Clone repo to `~/projects/<app>/repo` if missing.
|
||||
2. Otherwise `fetch origin main` and `reset --hard origin/main`.
|
||||
3. Build binary to `<PROJECTS_ROOT>/bin/app`.
|
||||
3. Build binary to `~/projects/<app>/bin/app`.
|
||||
4. Restart the project user service via `systemctl --user restart`.
|
||||
|
||||
Notes:
|
||||
|
|
@ -105,8 +101,8 @@ Notes:
|
|||
## Systemd
|
||||
|
||||
For each project in workspace `<ws>` owned by unix user `<unix_user>`, the app writes:
|
||||
- env file: `<PROJECTS_ROOT>/.env`
|
||||
- binary path used by systemd: `<PROJECTS_ROOT>/bin/app`
|
||||
- env file: `<unix-user-home>/projects/<app>/.env`
|
||||
- binary path used by systemd: `<unix-user-home>/projects/<app>/bin/app`
|
||||
- unit file: `<home-of-unix-user>/.config/systemd/user/projectmgr-<app-user>-<project>.service`
|
||||
|
||||
Then it attempts as that unix user:
|
||||
|
|
@ -115,6 +111,6 @@ Then it attempts as that unix user:
|
|||
|
||||
The generated `.env` is synced from the project env-var configuration and always includes:
|
||||
- `LISTEN_NETWORK=unix`
|
||||
- `LISTEN_ADDRESS=<PROJECTS_ROOT>/app.sock`
|
||||
- `LISTEN_ADDRESS=<unix-user-home>/projects/<app>/app.sock`
|
||||
|
||||
If user systemd is not available in the runtime environment, project creation still succeeds and unit files are still generated.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue