Updated config
This commit is contained in:
@@ -9,6 +9,8 @@ services:
|
||||
hostname: metasort-app
|
||||
restart: unless-stopped
|
||||
cpu_shares: 20
|
||||
mem_limit: 2g
|
||||
memswap_limit: 2g
|
||||
|
||||
expose:
|
||||
- 80
|
||||
@@ -26,6 +28,17 @@ services:
|
||||
# Docker socket for container plugin management
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
|
||||
# Config files from this app's seed tree (Apps/MetaSort/seed/config/),
|
||||
# which Maison writes only when absent — an operator's edits survive
|
||||
# updates. The image ships no plugins.yml, so without it a stock install
|
||||
# spawns ZERO plugins; the supervisord override drops the image's bundled
|
||||
# follower meta-core, which restart-loops against the standalone MetaCore
|
||||
# app; the nginx conf is the image's stock one, mounted so a box can tune
|
||||
# it (watch.nsl.sh 503s /api/stats, which sweeps every record).
|
||||
- ${DATA_ROOT:-/DATA}/AppData/metasort/config/plugins.yml:/app/plugins.yml:ro
|
||||
- ${DATA_ROOT:-/DATA}/AppData/metasort/config/supervisord-metasort.conf:/etc/supervisor/conf.d/supervisord.conf:ro
|
||||
- ${DATA_ROOT:-/DATA}/AppData/metasort/config/nginx-metasort.conf:/etc/nginx/nginx.conf:ro
|
||||
|
||||
# Note: no /files mounts — files are accessed via WebDAV from MetaCore
|
||||
# (Architecture V3). MetaCore is the single source of truth for media files.
|
||||
|
||||
@@ -41,6 +54,13 @@ services:
|
||||
# Container plugin configuration
|
||||
- CONTAINER_CALLBACK_URL=http://metasort-app/api/plugins/callback
|
||||
- CONTAINER_NETWORK=pcs
|
||||
# meta-core URL handed to plugin containers. Port 3000, not 80: the baked
|
||||
# nginx has no /meta/ location, so plugin writes through :80 would 404.
|
||||
# (The code default, http://meta-sort, names no host on this network.)
|
||||
- CONTAINER_META_CORE_URL=http://metasort-app:3000
|
||||
# Compose project label stamped on the plugin containers meta-sort spawns,
|
||||
# so they group under one stack instead of floating loose.
|
||||
- PLUGIN_STACK_NAME=metasort-plugins
|
||||
|
||||
# Note: Runs as root for nginx, Redis, and file management
|
||||
user: 0:0
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
worker_processes auto;
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent"';
|
||||
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
keepalive_timeout 65;
|
||||
gzip on;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml;
|
||||
|
||||
# Upstream servers
|
||||
upstream api {
|
||||
server 127.0.0.1:3000;
|
||||
}
|
||||
|
||||
upstream rclone {
|
||||
server 127.0.0.1:5572;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
# Static files (UI)
|
||||
root /app/ui;
|
||||
index index.html;
|
||||
|
||||
# SPA routing - serve index.html for any non-file request
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# API routes
|
||||
location /api/ {
|
||||
proxy_pass http://api;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
# Health check (direct to API)
|
||||
location /health {
|
||||
proxy_pass http://api/health;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
}
|
||||
|
||||
# rclone web UI
|
||||
location /rclone/ {
|
||||
proxy_pass http://rclone/;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
# Basic auth for rclone
|
||||
auth_basic "rclone";
|
||||
auth_basic_user_file /etc/nginx/.htpasswd;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,56 @@
|
||||
# Container plugins meta-sort spawns. Read at startup only: restart
|
||||
# metasort-app after editing.
|
||||
#
|
||||
# Not enabled by default: tmdb and filename-parser (cache filenames are content
|
||||
# hashes, so a parsed filename would overwrite a gateway record's better
|
||||
# identity) and full-hash (reads a multi-GB file end to end on the peer that
|
||||
# is streaming it).
|
||||
|
||||
defaults:
|
||||
resources:
|
||||
memory: 256m
|
||||
cpus: 0.5
|
||||
timeout: 60000
|
||||
|
||||
plugins:
|
||||
file-info:
|
||||
enabled: true
|
||||
image: ghcr.io/worph/metamesh-plugin-file-info:1.0.1
|
||||
instances: 1
|
||||
resources:
|
||||
memory: 128m
|
||||
cpus: 0.25
|
||||
|
||||
ffmpeg:
|
||||
enabled: true
|
||||
image: ghcr.io/worph/metamesh-plugin-ffmpeg:1.0.0
|
||||
instances: 1
|
||||
resources:
|
||||
memory: 512m
|
||||
cpus: 1.0
|
||||
|
||||
subtitle:
|
||||
enabled: true
|
||||
image: ghcr.io/worph/metamesh-plugin-subtitle:1.0.1
|
||||
instances: 1
|
||||
resources:
|
||||
memory: 128m
|
||||
cpus: 0.25
|
||||
|
||||
subtitle-extractor:
|
||||
enabled: true
|
||||
image: ghcr.io/worph/metamesh-plugin-subtitle-extractor:1.0.1
|
||||
instances: 1
|
||||
resources:
|
||||
memory: 512m
|
||||
cpus: 1.0
|
||||
timeout: 300000 # one full sequential read of the video over WebDAV
|
||||
|
||||
still-extractor:
|
||||
enabled: true
|
||||
image: ghcr.io/worph/metamesh-plugin-still-extractor:1.0.1
|
||||
instances: 1
|
||||
resources:
|
||||
memory: 512m
|
||||
cpus: 1.0
|
||||
timeout: 300000 # one HTTP seek + decode per candidate offset
|
||||
@@ -0,0 +1,44 @@
|
||||
# meta-sort image supervisord.conf with [program:meta-core] removed: the
|
||||
# bundled follower core restart-loops against the standalone MetaCore app.
|
||||
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
user=root
|
||||
logfile=/var/log/supervisor/supervisord.log
|
||||
pidfile=/var/run/supervisord.pid
|
||||
loglevel=info
|
||||
|
||||
[program:nginx]
|
||||
command=/usr/sbin/nginx -g "daemon off;"
|
||||
priority=20
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stdout_logfile=/var/log/supervisor/nginx.log
|
||||
stderr_logfile=/var/log/supervisor/nginx_error.log
|
||||
startsecs=2
|
||||
|
||||
[program:rclone]
|
||||
command=/usr/bin/rclone rcd --rc-web-gui --rc-web-gui-no-open-browser --rc-addr=:5572 --rc-user=admin --rc-pass=admin
|
||||
priority=30
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stdout_logfile=/var/log/supervisor/rclone.log
|
||||
stderr_logfile=/var/log/supervisor/rclone_error.log
|
||||
startsecs=3
|
||||
|
||||
[program:meta-sort]
|
||||
command=/usr/bin/node /app/backend/dist/index.js
|
||||
directory=/app/backend
|
||||
priority=40
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stdout_logfile=/dev/stdout
|
||||
stdout_logfile_maxbytes=0
|
||||
stderr_logfile=/dev/stderr
|
||||
stderr_logfile_maxbytes=0
|
||||
startsecs=5
|
||||
environment=
|
||||
REDIS_URL="redis://127.0.0.1:6379",
|
||||
REDIS_PREFIX="",
|
||||
API_HOST="0.0.0.0",
|
||||
API_PORT="3000"
|
||||
Reference in New Issue
Block a user