-
-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: multiple bug fixes. introduced timeout for jobs * feat: add dockerfile for slim binary * feat: add log level env vars --------- Co-authored-by: Spoked <Spoked@localhost>
- Loading branch information
1 parent
38c1b75
commit 9f6c7d1
Showing
18 changed files
with
186 additions
and
433 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# Riven Backend Builder | ||
|
||
FROM python:3.11.9-alpine3.19 as Base | ||
LABEL name="Riven" \ | ||
description="Riven Debrid Downloader" \ | ||
url="https://github.com/rivenmedia/riven" | ||
|
||
# Install system dependencies | ||
RUN apk --update add --no-cache curl bash shadow gcc python3-dev musl-dev linux-headers patchelf clang ccache && \ | ||
rm -rf /var/cache/apk/* | ||
RUN pip install --upgrade pip && pip install poetry==1.8.3 | ||
|
||
ENV POETRY_NO_INTERACTION=1 \ | ||
POETRY_VIRTUALENVS_IN_PROJECT=1 \ | ||
POETRY_VIRTUALENVS_CREATE=1 \ | ||
POETRY_CACHE_DIR=/tmp/poetry_cache | ||
|
||
# Install Poetry globally | ||
ENV POETRY_HOME="/etc/poetry" | ||
ENV PATH="$POETRY_HOME/bin:$PATH" | ||
#RUN curl -sSL https://install.python-poetry.org | python3 - --yes | ||
|
||
# Setup the application directory | ||
WORKDIR /riven | ||
|
||
# Expose ports | ||
EXPOSE 8080 | ||
|
||
# Set environment variable to force color output | ||
ENV FORCE_COLOR=1 | ||
ENV TERM=xterm-256color | ||
|
||
# Copy the Python project files | ||
COPY pyproject.toml poetry.lock* /riven/ | ||
|
||
# Install Python dependencies | ||
RUN poetry install --without dev --no-root && rm -rf $POETRY_CACHE_DIR | ||
|
||
# Copy backend code and other necessary files | ||
COPY backend/ /riven/backend | ||
COPY VERSION entrypoint.sh /riven/ | ||
|
||
RUN cd /riven/backend && poetry add nuitka && \ | ||
poetry run python3 -m nuitka --standalone --onefile --onefile-tempdir-spec=/onefile_%PID%_%TIME% --python-flag=nosite,-O --nofollow-import-to=pytest --clang --warn-implicit-exceptions --warn-unusual-code --prefer-source-code main.py | ||
|
||
FROM scratch | ||
|
||
COPY --from=Base /riven/backend/main.bin /main.bin | ||
COPY VERSION / | ||
VOLUME /data | ||
COPY --from=Base /lib/ /lib/ | ||
# Ensure entrypoint script is executable | ||
|
||
ENTRYPOINT ["/main.bin"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.7.0 | ||
0.7.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
|
||
import os | ||
import time | ||
|
||
if 'TZ' not in os.environ: | ||
os.environ['TZ'] = 'UTC' | ||
time.tzset() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
import argparse | ||
import contextlib | ||
import os | ||
import sys | ||
import threading | ||
import time | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
from .plex import PlexLibrary # noqa: F401 | ||
from .symlink import SymlinkLibrary # noqa: F401 |
Oops, something went wrong.