You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: deploy/runner/README.md
+31-5Lines changed: 31 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,8 @@ Edit `.env.runner` and set:
33
33
-`REPO_URL`: The GitHub repository URL (required, default: `https://github.com/arii/hrm`)
34
34
-`RUNNER_TOKEN`: Runner registration token (optional - auto-generated if not provided)
35
35
-`GITHUB_PAT`: GitHub Personal Access Token (optional - only needed if `gh` CLI is not authenticated)
36
+
-`RUNNER_MEMORY_LIMIT`: Memory limit for container (optional, e.g., `2g` for 2GB, recommended for production)
37
+
-`RUNNER_CPU_LIMIT`: CPU limit for container (optional, e.g., `2` for 2 CPUs, recommended for production)
36
38
37
39
#### Automatic Token Generation
38
40
@@ -89,7 +91,30 @@ Verify in GitHub:
89
91
90
92
For automatic startup on system boot and better management, set up the systemd service.
91
93
92
-
### Installation
94
+
### Automated Installation (Recommended)
95
+
96
+
Use the provided installation script to automatically configure paths:
97
+
98
+
```bash
99
+
sudo ./install-service.sh
100
+
```
101
+
102
+
This script will:
103
+
1. Detect the repository root path automatically
104
+
2. Update the service file with correct paths
105
+
3. Install the service to `/etc/systemd/system/`
106
+
4. Reload systemd daemon
107
+
108
+
After installation:
109
+
110
+
```bash
111
+
sudo systemctl enable hrm-runner.service
112
+
sudo systemctl start hrm-runner.service
113
+
```
114
+
115
+
### Manual Installation
116
+
117
+
If you prefer manual installation:
93
118
94
119
1. Edit `hrm-runner.service` and replace `/path/to/hrm` with the actual path to your repository:
95
120
@@ -288,7 +313,7 @@ cd /home/runner/actions-runner
288
313
### Important Security Limitations
289
314
290
315
-**No Docker-in-Docker by default**: The container does not mount the Docker socket, so jobs that need to build Docker images will fail. If needed, add `-v /var/run/docker.sock:/var/run/docker.sock` to the docker run command, but be aware this grants significant privileges.
291
-
-**Resource limits**: Consider adding `--memory` and `--cpus` flags to the docker run command to prevent resource exhaustion.
316
+
-**Resource limits**: Configure `RUNNER_MEMORY_LIMIT` and `RUNNER_CPU_LIMIT` in `.env.runner`to prevent resource exhaustion. Recommended for production deployments (e.g., `RUNNER_MEMORY_LIMIT=2g` and `RUNNER_CPU_LIMIT=2`).
292
317
-**Sudo access**: The runner user has sudo access (with password requirement). For maximum security, you may want to remove sudo access entirely if not needed by your workflows.
293
318
-**GitHub PAT Storage**: If using `GITHUB_PAT` for automatic token generation, ensure `.env.runner` file permissions are restrictive (`chmod 600 .env.runner`).
294
319
@@ -325,9 +350,10 @@ cd /home/runner/actions-runner
0 commit comments