mf-hosting 2.0.7 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,48 @@
1
+ {
2
+ "plugins": [
3
+ "@semantic-release/commit-analyzer",
4
+ "@semantic-release/release-notes-generator",
5
+ "@semantic-release/npm",
6
+ [
7
+ "@semantic-release/exec",
8
+ {
9
+ "publishCmd": "npx npm-pkgbuild --publish dist"
10
+ }
11
+ ],
12
+ [
13
+ "@semantic-release/github",
14
+ {
15
+ "assets": [
16
+ {
17
+ "path": "dist/*.deb",
18
+ "label": "any Debian Package"
19
+ },
20
+ {
21
+ "path": "dist/*any.pkg.*",
22
+ "label": "any Arch Linux Package"
23
+ },
24
+ {
25
+ "path": "dist/*x86_64.pkg.*",
26
+ "label": "x86_64 Arch Linux Package"
27
+ },
28
+ {
29
+ "path": "dist/*aarch64.pkg.*",
30
+ "label": "arm64 Arch Linux Package"
31
+ },
32
+ {
33
+ "path": "dist/*noarch.rpm",
34
+ "label": "noarch RPM"
35
+ },
36
+ {
37
+ "path": "dist/*x86_64.rpm",
38
+ "label": "x86_64 RPM"
39
+ },
40
+ {
41
+ "path": "dist/*aarch64.rpm",
42
+ "label": "arm64 RPM"
43
+ }
44
+ ]
45
+ }
46
+ ]
47
+ ]
48
+ }
package/package.json CHANGED
@@ -1,12 +1,21 @@
1
1
  {
2
2
  "name": "mf-hosting",
3
- "version": "2.0.7",
3
+ "version": "2.1.0",
4
4
  "description": "hosting definitions @MF",
5
5
  "keywords": [
6
- "npm-pkgbuild"
6
+ "npm-pkgbuild",
7
+ "semantic-release-config"
7
8
  ],
9
+ "files": [
10
+ ".releaserc.json"
11
+ ],
12
+ "main": ".releaserc.json",
8
13
  "devDependencies": {
9
- "semantic-release": "^23.1.1"
14
+ "semantic-release": "^23.1.1",
15
+ "@semantic-release/commit-analyzer": "^12.0.0",
16
+ "@semantic-release/exec": "^6.0.3",
17
+ "@semantic-release/github": "^10.0.4",
18
+ "@semantic-release/release-notes-generator": "^13.0.0"
10
19
  },
11
20
  "repository": {
12
21
  "type": "git",
@@ -106,6 +115,19 @@
106
115
  "bun.exe": "/usr/bin/bun",
107
116
  "nginx.location.trailer": ""
108
117
  },
118
+ {
119
+ "requires": {
120
+ "properties": {
121
+ "example": true
122
+ }
123
+ },
124
+ "install.base.dir": "/examples/",
125
+ "http.base.path": "/examples",
126
+ "groups": "examples",
127
+ "description": "example showing ${name} features in action",
128
+ "variant": "mf.linux",
129
+ "nginx.location.trailer": " access_log off;\n"
130
+ },
109
131
  {
110
132
  "requires": {
111
133
  "dependencies": {
package/pkg/hooks.sh DELETED
@@ -1,23 +0,0 @@
1
-
2
- post_install() {
3
- systemctl daemon-reload
4
- systemctl enable {{name}}
5
- systemctl enable {{name}}.socket
6
- systemctl start {{name}}.socket
7
- }
8
-
9
- pre_upgrade() {
10
- systemctl stop {{name}}
11
- }
12
-
13
- post_upgrade() {
14
- systemctl daemon-reload
15
- systemctl restart {{name}}.socket
16
- }
17
-
18
- pre_remove() {
19
- systemctl stop {{name}}.socket
20
- systemctl disable {{name}}.socket
21
- systemctl stop {{name}}
22
- systemctl disable {{name}}
23
- }
package/pkg/nginx.conf DELETED
@@ -1,15 +0,0 @@
1
- location {{http.path}} {
2
- rewrite {{http.path}}(.*) $1 break;
3
- proxy_set_header X-Real-IP $remote_addr;
4
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
5
- proxy_set_header Host $http_host;
6
- proxy_set_header X-NginX-Proxy true;
7
- proxy_set_header Upgrade $http_upgrade;
8
- proxy_set_header Connection "upgrade";
9
- proxy_pass http://unix:{{socket.http}};
10
-
11
- add_header X-Content-Type-Options nosniff;
12
- add_header Content-Security-Policy "{{csp.header}}" always;
13
- add_header Cache-Control "private,no-store";
14
- add_header alt-svc 'h3=":443";ma=7776000;persist=1';
15
- {{nginx.location.trailer}}}
@@ -1,17 +0,0 @@
1
- backup()
2
- {
3
- mkdir -p $1/{{name}}
4
- cp -ra /etc/{{name}}/* $1/{{name}}
5
- }
6
-
7
- restore()
8
- {
9
- mkdir -p /etc/{{name}}
10
- cp -ra $1/{{name}}/* /etc/{{name}}
11
- }
12
-
13
- sync()
14
- {
15
- mkdir -p /etc/{{name}}
16
- rsync -e "ssh -i /root/.ssh/rsync" -ra -X -A -S --stats root@$SOURCE_HOST:/etc/{{name}} /etc/|grep -E -v '(data|time):'
17
- }
@@ -1,55 +0,0 @@
1
- [Unit]
2
- Description={{description}}
3
- Wants=network-online.target
4
- After=network-online.target
5
- StopWhenUnneeded=true
6
-
7
- [Service]
8
- Type=notify
9
- ExecStart={{node.exe}} --unhandled-rejections=strict --trace-uncaught --trace-warnings --title {{name}} {{install.dir}}src/{{name}}-cli.mjs
10
- ExecReload=/bin/kill -HUP $MAINPID
11
- ExecStop=sleep 20
12
- RestartSec=40
13
- TimeoutStartSec=25
14
- TimeoutStopSec=30
15
- Restart=on-failure
16
- NotifyAccess=all
17
- FileDescriptorStoreMax=5
18
- OOMPolicy=stop
19
- User={{os.user}}
20
- Group={{os.user}}
21
- DynamicUser=false
22
- SupplementaryGroups=http
23
- CapabilityBoundingSet=~CAP_SYS_BOOT CAP_SYS_ADMIN CAP_NET_ADMIN CAP_SYS_NICE CAP_SYS_RESOURCE CAP_KILLC AP_IPC_LOCK CAP_CHOWN CAP_FSETID CAP_SETFCAP CAP_SETUID CAP_SETGID CAP_SETPCAP CAP_WAKE_ALARM CAP_NET_BIND_SERVICE CAP_NET_BROADCAST CAP_NET_RAW CAP_KILL
24
- NoNewPrivileges=true
25
- UMask=0077
26
- ProtectSystem=full
27
- ProtectHome=true
28
- RuntimeDirectory={{name}}
29
- StateDirectory={{name}}
30
- CacheDirectory={{name}}
31
- ConfigurationDirectory={{name}}
32
- RuntimeDirectoryMode=755
33
- RuntimeDirectoryPreserve=yes
34
- PrivateTmp=true
35
- PrivateDevices=true
36
- PrivateUsers=true
37
- ProtectHostname=true
38
- ProtectClock=true
39
- ProtectKernelTunables=true
40
- ProtectKernelModules=true
41
- ProtectKernelLogs=true
42
- ProtectControlGroups=true
43
- LockPersonality=true
44
- RestrictRealtime=true
45
- RestrictSUIDSGID=true
46
- CPUWeight=10
47
- IOWeight=10
48
- MemoryAccounting=true
49
- MemoryHigh=30M
50
- MemoryMax=60M
51
- ProtectProc=noaccess
52
- SystemCallErrorNumber=EPERM
53
-
54
- [Install]
55
- WantedBy=multi-user.target
@@ -1,9 +0,0 @@
1
- [Socket]
2
- ListenStream={{socket.http}}
3
- SocketUser={{socket.http.user}}
4
- SocketGroup={{socket.http.group}}
5
- MaxConnections=4
6
- FileDescriptorName=http.listen.socket
7
-
8
- [Install]
9
- RequiredBy={{name}}.service
package/pkg/sysusers.conf DELETED
@@ -1 +0,0 @@
1
- u {{os.user}} - "{{description}}" {{var.dir}} /usr/bin/nologin
package/pkg/tmpfiles.conf DELETED
@@ -1,3 +0,0 @@
1
- D {{run.dir}} 0755 {{os.user}} {{os.group}} -
2
- d {{var.dir}} 0755 {{os.user}} {{os.group}} -
3
- D {{run.dir}}http 2775 {{os.user}} {{socket.http.user}} -