mf-hosting 2.10.2 → 3.0.1
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/package.json +59 -59
- package/pkg/nginx.conf +7 -7
- package/pkg/systemd.service +6 -6
- package/pkg/systemd.socket +3 -3
- package/pkg/sysusers.conf +1 -1
- package/pkg/tmpfiles.conf +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mf-hosting",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"files": [
|
|
5
5
|
".releaserc.json",
|
|
6
6
|
"pkg/hooks.sh",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"properties": {
|
|
41
41
|
"systemd": true,
|
|
42
42
|
"nginx": true,
|
|
43
|
-
"
|
|
44
|
-
"
|
|
43
|
+
"nginx_sites_dir": "/etc/nginx/sites/common/",
|
|
44
|
+
"nginx_content_dir": "/srv/http/"
|
|
45
45
|
},
|
|
46
46
|
"arch": [
|
|
47
47
|
"aarch64"
|
|
@@ -51,15 +51,15 @@
|
|
|
51
51
|
"nginx-mainline": ">=1.29.5"
|
|
52
52
|
},
|
|
53
53
|
"content": {
|
|
54
|
-
"${
|
|
55
|
-
"${
|
|
54
|
+
"${nginx_locations_dir}${nginx_location_category}/${name}.conf": "pkg/nginx.conf",
|
|
55
|
+
"${systemd_unit_dir}${name}.socket": "pkg/systemd.socket"
|
|
56
56
|
}
|
|
57
57
|
},
|
|
58
58
|
"debian": {
|
|
59
59
|
"properties": {
|
|
60
60
|
"systemd": true,
|
|
61
61
|
"nginx": true,
|
|
62
|
-
"
|
|
62
|
+
"nginx_content_dir": "/var/www/html/"
|
|
63
63
|
},
|
|
64
64
|
"arch": [
|
|
65
65
|
"aarch64",
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
"nginx": ">=1.22.1"
|
|
71
71
|
},
|
|
72
72
|
"content": {
|
|
73
|
-
"${
|
|
74
|
-
"${
|
|
73
|
+
"${nginx_locations_dir}${nginx_location_category}/${name}.conf": "pkg/nginx.conf",
|
|
74
|
+
"${systemd_unit_dir}${name}.socket": "pkg/systemd.socket"
|
|
75
75
|
}
|
|
76
76
|
},
|
|
77
77
|
"rpm": {
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
},
|
|
86
86
|
"docker": {
|
|
87
87
|
"properties": {
|
|
88
|
-
"
|
|
89
|
-
"workdir": "${
|
|
88
|
+
"install_dir": "/app",
|
|
89
|
+
"workdir": "${install_dir}"
|
|
90
90
|
},
|
|
91
91
|
"dependencies": {
|
|
92
92
|
"node": "lts-slim"
|
|
@@ -101,48 +101,48 @@
|
|
|
101
101
|
"arch": [
|
|
102
102
|
"aarch64"
|
|
103
103
|
],
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
"
|
|
107
|
-
"
|
|
108
|
-
"
|
|
109
|
-
"
|
|
110
|
-
"
|
|
111
|
-
"
|
|
112
|
-
"
|
|
113
|
-
"
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
-
"
|
|
117
|
-
"
|
|
118
|
-
"
|
|
119
|
-
"
|
|
120
|
-
"
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
-
"
|
|
124
|
-
"
|
|
125
|
-
"
|
|
126
|
-
"
|
|
127
|
-
"
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
"
|
|
131
|
-
"
|
|
104
|
+
"backup_config_dir": "/usr/lib/backup.d/",
|
|
105
|
+
"backup_lib_dir": "/usr/lib/backup.d/",
|
|
106
|
+
"config_dir": "/etc/${name}/",
|
|
107
|
+
"http_api": "${http_origin}${http_api_path}",
|
|
108
|
+
"http_api_path": "${http_path}/api",
|
|
109
|
+
"http_base_path": "/services",
|
|
110
|
+
"http_origin": "https://mfelten.dynv6.net",
|
|
111
|
+
"http_path": "${http_base_path}/${name}",
|
|
112
|
+
"install_base_dir": "/services/",
|
|
113
|
+
"install_dir": "${install_base_dir}${name}${install_sub_dir}",
|
|
114
|
+
"install_sub_dir": "/",
|
|
115
|
+
"journal_endpoint": "/services/journal",
|
|
116
|
+
"os_group": "${name}",
|
|
117
|
+
"os_user": "${name}",
|
|
118
|
+
"polkit_rules_dir": "/etc/polkit-1/rules.d/",
|
|
119
|
+
"public_base_url": "${http_origin}/",
|
|
120
|
+
"run_dir": "/run/${name}/",
|
|
121
|
+
"socket_http": "${run_dir}http/socket",
|
|
122
|
+
"socket_http_group": "http",
|
|
123
|
+
"socket_http_user": "http",
|
|
124
|
+
"systemd_unit_dir": "/usr/lib/systemd/system/",
|
|
125
|
+
"systemd_WantedBy": "multi-user.target",
|
|
126
|
+
"systemd_Wants": "network-online.target",
|
|
127
|
+
"systemd_After": "network-online.target",
|
|
128
|
+
"sysusers_config_dir": "/usr/lib/sysusers.d/",
|
|
129
|
+
"tmpfiles_config_dir": "/usr/lib/tmpfiles.d/",
|
|
130
|
+
"credentials_dir": "/etc/credstore.encrypted/",
|
|
131
|
+
"var_dir": "/var/lib/${name}/",
|
|
132
132
|
"variant": "mf.linux",
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
"
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
"
|
|
140
|
-
"
|
|
141
|
-
"
|
|
142
|
-
"
|
|
143
|
-
"
|
|
144
|
-
"
|
|
145
|
-
"
|
|
133
|
+
"well_known_content_dir": "${nginx_content_dir}.well-known/",
|
|
134
|
+
"wss_api": "${wss_origin}${http_api_path}",
|
|
135
|
+
"wss_origin": "${http_origin}",
|
|
136
|
+
"node_exe": "/usr/bin/node",
|
|
137
|
+
"bun_exe": "/usr/bin/bun",
|
|
138
|
+
"nginx_location_header": "",
|
|
139
|
+
"nginx_location_trailer": "",
|
|
140
|
+
"nginx_server_extra": "",
|
|
141
|
+
"nginx_locations_dir": "/etc/nginx/locations/",
|
|
142
|
+
"nginx_location_category": "common",
|
|
143
|
+
"nginx_sites_dir": "/etc/nginx/sites-available/",
|
|
144
|
+
"csp_header": "",
|
|
145
|
+
"cache_control_header": "private,no-store"
|
|
146
146
|
},
|
|
147
147
|
{
|
|
148
148
|
"requires": {
|
|
@@ -150,13 +150,13 @@
|
|
|
150
150
|
"example": true
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
|
-
"
|
|
154
|
-
"
|
|
153
|
+
"install_base_dir": "/examples/",
|
|
154
|
+
"http_base_path": "/examples",
|
|
155
155
|
"groups": "examples",
|
|
156
156
|
"description": "example showing ${name} features in action",
|
|
157
157
|
"variant": "mf.linux",
|
|
158
|
-
"
|
|
159
|
-
"
|
|
158
|
+
"nginx_location_trailer": " access_log off;\n",
|
|
159
|
+
"nginx_location_category": "examples"
|
|
160
160
|
},
|
|
161
161
|
{
|
|
162
162
|
"requires": {
|
|
@@ -168,11 +168,11 @@
|
|
|
168
168
|
}
|
|
169
169
|
},
|
|
170
170
|
"content": {
|
|
171
|
-
"${
|
|
172
|
-
"${
|
|
173
|
-
"${
|
|
171
|
+
"${backup_lib_dir}${name}.backup": "pkg/service.backup",
|
|
172
|
+
"${sysusers_config_dir}${name}.conf": "pkg/sysusers.conf",
|
|
173
|
+
"${tmpfiles_config_dir}${name}.conf": "pkg/tmpfiles.conf"
|
|
174
174
|
},
|
|
175
|
-
"backup": "${
|
|
175
|
+
"backup": "${config_dir}config.json",
|
|
176
176
|
"hooks": "pkg/hooks.sh",
|
|
177
177
|
"variant": "mf.linux"
|
|
178
178
|
}
|
package/pkg/nginx.conf
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
location {{
|
|
2
|
-
{{
|
|
1
|
+
location {{http_path}} {
|
|
2
|
+
{{nginx_location_header}} rewrite {{http_path}}(.*) $1 break;
|
|
3
3
|
|
|
4
|
-
proxy_pass http://unix:{{
|
|
4
|
+
proxy_pass http://unix:{{socket_http}};
|
|
5
5
|
proxy_http_version 2;
|
|
6
6
|
|
|
7
7
|
proxy_set_header Upgrade $http_upgrade;
|
|
@@ -13,9 +13,9 @@ location {{http.path}} {
|
|
|
13
13
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
14
14
|
|
|
15
15
|
add_header X-Content-Type-Options nosniff;
|
|
16
|
-
add_header Content-Security-Policy "{{
|
|
17
|
-
add_header Cache-Control "{{
|
|
16
|
+
add_header Content-Security-Policy "{{csp_header}}" always;
|
|
17
|
+
add_header Cache-Control "{{cache_control_header}}";
|
|
18
18
|
add_header alt-svc 'h3=":443";ma=86400;persist=1';
|
|
19
|
-
{{
|
|
19
|
+
{{nginx_location_trailer}}}
|
|
20
20
|
|
|
21
|
-
{{
|
|
21
|
+
{{nginx_server_extra}}
|
package/pkg/systemd.service
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
[Unit]
|
|
2
2
|
Description={{description}}
|
|
3
|
-
Wants={{
|
|
4
|
-
After={{
|
|
3
|
+
Wants={{systemd_Wants}}
|
|
4
|
+
After={{systemd_After}}
|
|
5
5
|
StopWhenUnneeded=true
|
|
6
6
|
|
|
7
7
|
[Service]
|
|
8
8
|
Type=notify
|
|
9
|
-
ExecStart={{
|
|
9
|
+
ExecStart={{node_exe}} --unhandled-rejections=strict --trace-uncaught --trace-warnings --title {{name}} {{install_dir}}src/{{name}}-cli.mjs
|
|
10
10
|
ExecReload=/bin/kill -HUP $MAINPID
|
|
11
11
|
ExecStop=sleep 20
|
|
12
12
|
RestartSec=40
|
|
@@ -16,8 +16,8 @@ Restart=on-failure
|
|
|
16
16
|
NotifyAccess=all
|
|
17
17
|
FileDescriptorStoreMax=5
|
|
18
18
|
OOMPolicy=stop
|
|
19
|
-
User={{
|
|
20
|
-
Group={{
|
|
19
|
+
User={{os_user}}
|
|
20
|
+
Group={{os_user}}
|
|
21
21
|
DynamicUser=false
|
|
22
22
|
SupplementaryGroups=http
|
|
23
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
|
|
@@ -52,4 +52,4 @@ ProtectProc=noaccess
|
|
|
52
52
|
SystemCallErrorNumber=EPERM
|
|
53
53
|
|
|
54
54
|
[Install]
|
|
55
|
-
WantedBy={{
|
|
55
|
+
WantedBy={{systemd_WantedBy}}
|
package/pkg/systemd.socket
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[Socket]
|
|
2
|
-
ListenStream={{
|
|
3
|
-
SocketUser={{
|
|
4
|
-
SocketGroup={{
|
|
2
|
+
ListenStream={{socket_http}}
|
|
3
|
+
SocketUser={{socket_http_user}}
|
|
4
|
+
SocketGroup={{socket_http_group}}
|
|
5
5
|
MaxConnections=4
|
|
6
6
|
FileDescriptorName=http.listen.socket
|
|
7
7
|
|
package/pkg/sysusers.conf
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
u! {{
|
|
1
|
+
u! {{os_user}} - "{{description}}" {{var_dir}} /usr/bin/nologin
|
package/pkg/tmpfiles.conf
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
D {{
|
|
2
|
-
d {{
|
|
3
|
-
D {{
|
|
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}} -
|