chore: initialize standalone business plugin repository
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
# Keep the plugin service private on loopback; expose it behind HTTPS.
|
||||
CORE_ORIGIN {
|
||||
handle_path /extensions/qiu.subscription-admin/* {
|
||||
reverse_proxy 127.0.0.1:8091
|
||||
}
|
||||
}
|
||||
|
||||
# Start the plugin with:
|
||||
# PLUGIN_PUBLIC_BASE_PATH=/extensions/qiu.subscription-admin
|
||||
# PLUGIN_COOKIE_PATH=/extensions/qiu.subscription-admin/
|
||||
# PLUGIN_COOKIE_SECURE=true
|
||||
# PLUGIN_FRAME_ANCESTORS='self'
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"id": "qiu.subscription-admin",
|
||||
"label": "订阅管理",
|
||||
"url": "https://CORE_ORIGIN/extensions/qiu.subscription-admin/",
|
||||
"visibility": "admin",
|
||||
"sort_order": 200
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
# Deploy beside the Core reverse proxy. Keep the plugin bound to loopback.
|
||||
location /extensions/qiu.subscription-admin/ {
|
||||
proxy_pass http://127.0.0.1:8091/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_read_timeout 30s;
|
||||
proxy_send_timeout 30s;
|
||||
}
|
||||
|
||||
# Start the plugin with:
|
||||
# PLUGIN_PUBLIC_BASE_PATH=/extensions/qiu.subscription-admin
|
||||
# PLUGIN_COOKIE_PATH=/extensions/qiu.subscription-admin/
|
||||
# PLUGIN_COOKIE_SECURE=true
|
||||
# PLUGIN_FRAME_ANCESTORS='self'
|
||||
@@ -0,0 +1,22 @@
|
||||
[Unit]
|
||||
Description=Sub2API Subscription Admin business plugin
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=sub2api-plugin
|
||||
Group=sub2api-plugin
|
||||
WorkingDirectory=/opt/sub2api/subscription-admin
|
||||
EnvironmentFile=/etc/sub2api/subscription-admin.env
|
||||
ExecStart=/opt/sub2api/subscription-admin/bin/subscription-admin
|
||||
Restart=on-failure
|
||||
RestartSec=3
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
ProtectSystem=strict
|
||||
ProtectHome=true
|
||||
ReadWritePaths=/var/lib/sub2api/subscription-admin
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user