diff --git a/app/Dockerfile b/app/Dockerfile
index 43efdf1..a709426 100644
--- a/app/Dockerfile
+++ b/app/Dockerfile
@@ -2,6 +2,7 @@ FROM python:3.13-slim
ARG puid=1000
ARG pgid=1000
+ARG debug=false
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
LANG=C.UTF-8 \
@@ -40,8 +41,13 @@ RUN yarn install
WORKDIR /app
RUN pip install --upgrade pip
-COPY ./requirements.txt ./requirements.txt
-RUN pip install --no-cache-dir -r requirements.txt
+COPY requirements*.txt ./
+RUN if [ "$debug" = "true" ] ; then \
+ pip install --no-cache-dir -r requirements-dev.txt ; \
+ else \
+ pip install --no-cache-dir -r requirements-prod.txt ; \
+ fi
+
#COPY . .
diff --git a/app/app/settings.py b/app/app/settings.py
index 726f76b..f368128 100644
--- a/app/app/settings.py
+++ b/app/app/settings.py
@@ -59,6 +59,8 @@ INSTALLED_APPS = [
'api',
'torrent',
]
+if DEBUG:
+ INSTALLED_APPS = ["daphne"] + INSTALLED_APPS
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
@@ -139,6 +141,7 @@ USE_TZ = True
STATIC_URL = '/static/'
STATICFILES_DIRS = [
+ BASE_DIR / "static",
BASE_DIR / "frontend/dist",
]
STATIC_ROOT = BASE_DIR / "static_collected"
diff --git a/app/app/urls.py b/app/app/urls.py
index 23e6c9e..0b7f22c 100644
--- a/app/app/urls.py
+++ b/app/app/urls.py
@@ -17,6 +17,7 @@ Including another URLconf
from django.contrib import admin
from django.urls import path, include # Added include for including app URLs
from django.http import HttpResponse
+from django.views.generic import RedirectView
from django.contrib.auth.views import (
PasswordResetView, PasswordResetDoneView, PasswordResetConfirmView, PasswordResetCompleteView, PasswordChangeView,
PasswordChangeDoneView, LogoutView
@@ -28,6 +29,7 @@ urlpatterns = [
path("", include("torrent.urls", "torrent")),
path("user/", include("user.urls", "user")),
path("api/", include("api.urls", "api")),
+ path("home", RedirectView.as_view(url="/", permanent=False), name="home"),
# reset password related
path("password_reset/", PasswordResetView.as_view(), name="password_reset"),
diff --git a/app/frontend/src/components/torrent/App.vue b/app/frontend/src/components/torrent/App.vue
index fac9fac..54d856c 100644
--- a/app/frontend/src/components/torrent/App.vue
+++ b/app/frontend/src/components/torrent/App.vue
@@ -37,6 +37,11 @@
Manage
+
diff --git a/app/requirements.txt b/app/requirements-common.txt
similarity index 80%
rename from app/requirements.txt
rename to app/requirements-common.txt
index d252e3b..c34418d 100644
--- a/app/requirements.txt
+++ b/app/requirements-common.txt
@@ -6,15 +6,9 @@ django-filter
djangorestframework-simplejwt
channels
channels_redis
-
-celery
-
pytz
-psycopg[binary]
-uvicorn
transmission-rpc
stream-zip
anyio
websockets
uvloop
-watchfiles
diff --git a/app/requirements-dev.txt b/app/requirements-dev.txt
new file mode 100644
index 0000000..2331212
--- /dev/null
+++ b/app/requirements-dev.txt
@@ -0,0 +1,2 @@
+-r requirements-common.txt
+daphne
\ No newline at end of file
diff --git a/app/requirements-prod.txt b/app/requirements-prod.txt
new file mode 100644
index 0000000..c657880
--- /dev/null
+++ b/app/requirements-prod.txt
@@ -0,0 +1,2 @@
+-r requirements-common.txt
+uvicorn
\ No newline at end of file
diff --git a/app/static/oxpanel.png b/app/static/oxpanel.png
new file mode 100644
index 0000000..d869281
Binary files /dev/null and b/app/static/oxpanel.png differ
diff --git a/app/templates/base.html b/app/templates/base.html
index 802700b..bd69915 100644
--- a/app/templates/base.html
+++ b/app/templates/base.html
@@ -1,9 +1,11 @@
-{% load django_vite %}
+{% load django_vite %}{% load static %}
{% block base_title %}Oxpanel{% block title %}{% endblock %}{% endblock %}
- {% block base_css %}
+
+
+ {% block base_css %}
{# {% stylesheet_pack 'app' %}#}
{% block css %}{% endblock %}
diff --git a/docker-compose.yml b/docker-compose.yml
index b21bfa2..536c402 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -58,6 +58,7 @@ services:
args:
puid: ${USER_ID}
pgid: ${GROUP_ID}
+ debug: ${DEBUG:-false}
env_file:
- .env
volumes: