Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ data/cookies/*.txt
data/cookies/*.pkl
data/cookies/*.pickle
data/banned/*.*
data/web_ui/*.*
data/web_ui/templates/*.html
data/web_ui/static/js/*.js
data/web_ui/*.py
requirements.txt
docker-compose.yml
Dockerfile
bin/mkbrr/*
*.mkv
.vscode/
Expand Down
17 changes: 13 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ ENV PATH="/venv/bin:$PATH"
# Install wheel, requests (for DVD MediaInfo download), and other Python dependencies
RUN pip install --upgrade pip wheel requests

# Set the working directory in the container
# Install Web UI dependencies (in venv)
RUN pip install --no-cache-dir flask flask-cors

# Set the working directory FIRST
WORKDIR /Upload-Assistant

# Copy DVD MediaInfo download script and run it
# This downloads specialized MediaInfo binaries for DVD processing with language support
COPY bin/get_dvd_mediainfo_docker.py bin/
RUN python3 bin/get_dvd_mediainfo_docker.py

Expand All @@ -40,7 +42,7 @@ RUN chmod +x bin/download_mkbrr_for_docker.py
# Download only the required mkbrr binary
RUN python3 bin/download_mkbrr_for_docker.py

# Copy the rest of the application
# Copy the rest of the application (including web_ui)
COPY . .

# Ensure mkbrr is executable
Expand All @@ -50,5 +52,12 @@ RUN find bin/mkbrr -type f -name "mkbrr" -exec chmod +x {} \;
RUN mkdir -p /Upload-Assistant/tmp && chmod 777 /Upload-Assistant/tmp
ENV TMPDIR=/Upload-Assistant/tmp

# Add environment variable to enable/disable Web UI
ENV ENABLE_WEB_UI=false

# Make entrypoint script executable
RUN chmod +x docker-entrypoint.sh

# Set the entry point for the container
ENTRYPOINT ["python", "/Upload-Assistant/upload.py"]
ENTRYPOINT ["/Upload-Assistant/docker-entrypoint.sh"]
CMD ["python", "upload.py"]
21 changes: 21 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
services:
l4g-upload-assistant-cli:
image: ghcr.io/audionut/upload-assistant:web-ui
container_name: UA
restart: unless-stopped
networks:
- yournetwork #change to the network with ur torrent instance
ports:
- "5000:5000" #change left side to your specific port.
environment:
- ENABLE_WEB_UI=true
entrypoint: /bin/bash
command: -c "source /venv/bin/activate && python /Upload-Assistant/web_ui/server.py & tail -f /dev/null"
volumes:
- /path/to/torrents/:/data/torrents/:rw #map this to qbit download location, map exactly as qbittorent template on both sides.
- /mnt/user/appdata/Upload-Assistant/data/config.py:/Upload-Assistant/data/config.py:rw #map this to config.py exactly
- /mnt/user/appdata/qBittorrent/data/BT_backup/:/torrent_storage_dir:rw #map this to your qbittorrent bt_backup
- /mnt/user/appdata/Upload-Assistant/tmp/:/Upload-Assistant/tmp:rw #map this to your /tmp folder.
networks:
"yournetwork": #change this to your network
external: true
18 changes: 18 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
set -e

# Activate virtual environment (where Flask is installed)
source /venv/bin/activate

# Start Web UI if enabled
if [ "$ENABLE_WEB_UI" = "true" ]; then
echo "Starting Upload Assistant Web UI..."
cd /Upload-Assistant
python web_ui/server.py &
WEB_UI_PID=$!
echo "Web UI started with PID: $WEB_UI_PID"
echo "Access at: http://localhost:5000"
fi

# Execute the main command
exec "$@"
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ transmission_rpc
tvdb-v4-official
unidecode
urllib3
flask>=2.3.0
flask-cors>=4.0.0
2 changes: 2 additions & 0 deletions web_ui/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
"""Upload Assistant Web UI"""
__version__ = "1.0.0"
Loading