mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-15 20:06:10 +05:00
Fixes
This commit is contained in:
@@ -47,6 +47,7 @@ RUN apt-get update && apt-get install -y \
|
||||
curl \
|
||||
ca-certificates \
|
||||
supervisor \
|
||||
nginx \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy TorrServer binary
|
||||
@@ -64,6 +65,9 @@ RUN mkdir -p /config/jellyfin \
|
||||
# Copy supervisor configuration
|
||||
COPY ./docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
|
||||
# Copy nginx configuration
|
||||
COPY ./docker/nginx.conf /etc/nginx/nginx.conf
|
||||
|
||||
# Copy startup script
|
||||
COPY ./docker/start.sh /start.sh
|
||||
RUN chmod +x /start.sh
|
||||
@@ -75,8 +79,11 @@ ENV TS_PORT=8090
|
||||
ENV GODEBUG=madvdontneed=1
|
||||
|
||||
# Expose ports
|
||||
# 8096 - Jellyfin HTTP
|
||||
# 8090 - TorrServer
|
||||
EXPOSE 8096 8090
|
||||
# 8080 - Nginx (reverse proxy для Jellyfin и TorrServer)
|
||||
# 8096 - Jellyfin HTTP (internal)
|
||||
# 8090 - TorrServer (internal)
|
||||
EXPOSE 8080
|
||||
|
||||
# Override Jellyfin's entrypoint
|
||||
ENTRYPOINT []
|
||||
CMD ["/start.sh"]
|
||||
|
||||
29
docker/nginx.conf
Normal file
29
docker/nginx.conf
Normal file
@@ -0,0 +1,29 @@
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
server {
|
||||
listen 8080;
|
||||
|
||||
# Jellyfin на корне
|
||||
location / {
|
||||
proxy_pass http://localhost:8096;
|
||||
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;
|
||||
proxy_buffering off;
|
||||
}
|
||||
|
||||
# TorrServer на /torrserver
|
||||
location /torrserver {
|
||||
rewrite ^/torrserver/(.*) /$1 break;
|
||||
proxy_pass http://localhost:8090;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,3 +19,11 @@ autorestart=true
|
||||
stdout_logfile=/var/log/supervisor/torrserver.log
|
||||
stderr_logfile=/var/log/supervisor/torrserver_error.log
|
||||
priority=2
|
||||
|
||||
[program:nginx]
|
||||
command=/usr/sbin/nginx -g "daemon off;"
|
||||
autostart=true
|
||||
autorestart=true
|
||||
stdout_logfile=/var/log/supervisor/nginx.log
|
||||
stderr_logfile=/var/log/supervisor/nginx_error.log
|
||||
priority=3
|
||||
|
||||
11
koyeb.yaml
11
koyeb.yaml
@@ -12,11 +12,16 @@ services:
|
||||
- key: TS_CONF_PATH
|
||||
value: /config/torrserver
|
||||
ports:
|
||||
- port: 8096
|
||||
- port: 8080
|
||||
protocol: http
|
||||
- port: 8090
|
||||
health_checks:
|
||||
- port: 8080
|
||||
protocol: http
|
||||
path: /torrserver
|
||||
path: /
|
||||
grace_period: 60
|
||||
interval: 10
|
||||
restart_limit: 3
|
||||
timeout: 10
|
||||
build:
|
||||
dockerfile: Dockerfile.jellyfin
|
||||
context: .
|
||||
|
||||
Reference in New Issue
Block a user