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
If you plan to make your web instance public, it is advised to restrict its access thanks to rate limiter and access list.
36
+
### 2️.1️ Restricting access to your web instance
37
+
38
+
If you intend to make your web instance public, it is advised to restrict access using an access list or rate-limiting it.
44
39
45
-
### 3. Start docker container
40
+
Only authorized users will be able to generate images.
46
41
47
-
Metrics docker images are published on [GitHub Container Registry](https://github.com/lowlighter/metrics/pkgs/container/metrics).
42
+
*Example: restricted access server*
43
+
```javascript
44
+
{
45
+
"restricted": ["user1", "user2", "user3"],
46
+
"maxusers":2,
47
+
"ratelimiter": {
48
+
"windowMs":900000,
49
+
"max":100
50
+
}
51
+
}
52
+
```
53
+
54
+
### 2️.2️ Global configuration
55
+
56
+
Configuration file also contains settings about enabled templates, plugins and features.
57
+
58
+
*Example: additional server configuration*
59
+
```javascript
60
+
{
61
+
"cached":3600000,
62
+
"port":3000,
63
+
"templates": {
64
+
"default":"classic",
65
+
"enabled": ["classic", "terminal"],
66
+
},
67
+
"community": {
68
+
"templates": ["user/repo@main:custom-theme"],
69
+
},
70
+
"hosted": {
71
+
"by":"me",
72
+
"link":"https://user.me",
73
+
},
74
+
"extras": {
75
+
"css":true,
76
+
"features":false
77
+
},
78
+
"plugins": {
79
+
"isocalendar":{
80
+
"enabled":false
81
+
}
82
+
}
83
+
}
84
+
```
85
+
86
+
> ⚠️ Extras features **should not** be enabled on a public server, most of these are compute-intensive and some of some even allow remote code execution! Use with caution
87
+
88
+
## 3️ Start docker container
89
+
90
+
Docker images are published on [GitHub Container Registry](https://github.com/lowlighter/metrics/pkgs/container/metrics).
48
91
49
92
Configure the following variables (or hardcode them in the command in the next block):
50
93
```shell
@@ -60,24 +103,47 @@ PUBLISHED_PORT=80
60
103
61
104
And start the container using the following command:
62
105
```shell
63
-
docker run -d --workdir=/metrics --entrypoint="" -p=127.0.0.1:$PUBLISHED_PORT:$SERVICE_PORT --volume=$SETTINGS:/metrics/settings.json ghcr.io/lowlighter/metrics:$VERSION npm start
106
+
docker run --entrypoint="" -p=127.0.0.1:$PUBLISHED_PORT:$SERVICE_PORT --volume=$SETTINGS:/metrics/settings.json ghcr.io/lowlighter/metrics:$VERSION npm start
64
107
```
65
108
66
-
### 4. Embed link into your README.md
109
+
##4️ Add images to your profile `README.md`
67
110
68
-
Edit your repository readme and add your metrics image from your server domain:
111
+
Update profile `README.md` to include rendered image.
0 commit comments