mf-hosting 1.8.2 → 1.8.4

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.
package/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2018-2022 by arlac77
1
+ Copyright (c) 2018-2023 by arlac77
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without
package/README.md CHANGED
@@ -1,3 +1,8 @@
1
+ [![npm](https://img.shields.io/npm/v/mf-hosting.svg)](https://www.npmjs.com/package/mf-hosting)
2
+ [![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)
3
+ [![Open Bundle](https://bundlejs.com/badge-light.svg)](https://bundlejs.com/?q=mf-hosting)
4
+ [![downloads](http://img.shields.io/npm/dm/mf-hosting.svg?style=flat-square)](https://npmjs.org/package/mf-hosting)
5
+ [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/arlac77/mf-hosting)
1
6
 
2
7
  # mf-hosting
3
8
 
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "mf-hosting",
3
- "version": "1.8.2",
3
+ "version": "1.8.4",
4
4
  "description": "hosting definitions @MF",
5
5
  "devDependencies": {
6
- "semantic-release": "^19.0.5"
6
+ "semantic-release": "^20.0.2"
7
7
  },
8
8
  "repository": {
9
9
  "type": "git",
10
- "url": "https://github.com/arlac77/mf-hosting.git"
10
+ "url": "https://github.com/arlac77/mf-hosting"
11
11
  },
12
12
  "bugs": {
13
13
  "url": "https://github.com/arlac77/mf-hosting/issues"
@@ -16,10 +16,11 @@
16
16
  "pkgbuild": {
17
17
  "output": {
18
18
  "arch": {},
19
- "debian": {}
19
+ "debian": {},
20
+ "rpm": {}
20
21
  },
22
+ "vendor": "MF",
21
23
  "groups": "services",
22
- "abstract": true,
23
24
  "arch": [
24
25
  "x86_64",
25
26
  "aarch64",
@@ -34,12 +35,12 @@
34
35
  "nginx-mainline": ">=1.23.2"
35
36
  },
36
37
  "html.base.href": "<base href=\"{{http.path}}/\"/>",
37
- "http.base.path": "/${groups}",
38
+ "http.api": "${http.origin}${http.api.path}",
39
+ "http.api.path": "${http.path}/api",
40
+ "http.base.path": "/services",
38
41
  "http.origin": "https://mfelten.dynv6.net",
39
42
  "http.path": "${http.base.path}/${name}",
40
- "http.api.path": "${http.path}/api",
41
- "http.api": "${http.origin}${http.api.path}",
42
- "install.base.dir": "/${groups}/",
43
+ "install.base.dir": "/services/",
43
44
  "install.dir": "${install.base.dir}${name}${install.sub.dir}",
44
45
  "install.sub.dir": "/",
45
46
  "journal.endpoint": "/services/journal",
@@ -58,8 +59,8 @@
58
59
  "var.dir": "/var/lib/${name}/",
59
60
  "variant": "mf.linux",
60
61
  "well-known.content.dir": "/srv/http/.well-known/",
61
- "wss.origin": "${http.origin}",
62
- "wss.api": "${wss.origin}${http.api.path}"
62
+ "wss.api": "${wss.origin}${http.api.path}",
63
+ "wss.origin": "${http.origin}"
63
64
  },
64
65
  "template": {
65
66
  "inheritFrom": [
package/pkg/nginx.conf ADDED
@@ -0,0 +1,12 @@
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 Content-Security-Policy "{{csp.header}}" always;
12
+ }
@@ -0,0 +1,55 @@
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=/usr/bin/node --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
@@ -0,0 +1,9 @@
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