From 3cd2e918e9aa311bc84b590957ad3b21c5bc7f98 Mon Sep 17 00:00:00 2001 From: Abhi <85984486+AbhiTheModder@users.noreply.github.com> Date: Fri, 7 Feb 2025 10:31:46 +0530 Subject: [PATCH] Create nixpacks.toml (#116) --- Cloudfile | 4 +++- Dockerfile | 2 ++ nixpacks.toml | 8 ++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 nixpacks.toml diff --git a/Cloudfile b/Cloudfile index f5d8283..21218db 100644 --- a/Cloudfile +++ b/Cloudfile @@ -4,5 +4,7 @@ COPY . /app RUN apt-get -qq update && apt-get -qq install -y git wget ffmpeg mediainfo \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* +RUN python -m venv --copies /opt/venv +ENV PATH="/opt/venv/bin:$PATH" RUN pip install --no-cache-dir -r requirements.txt -CMD ["bash", "cloud.sh"] \ No newline at end of file +CMD ["bash", "cloud.sh"] diff --git a/Dockerfile b/Dockerfile index 1d3557d..8569b54 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,5 +4,7 @@ COPY . /app RUN apt-get -qq update && apt-get -qq install -y git wget ffmpeg mediainfo \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* +RUN python -m venv --copies /opt/venv +ENV PATH="/opt/venv/bin:$PATH" RUN pip install --no-cache-dir -r requirements.txt CMD ["python", "main.py"] diff --git a/nixpacks.toml b/nixpacks.toml new file mode 100644 index 0000000..11554ac --- /dev/null +++ b/nixpacks.toml @@ -0,0 +1,8 @@ +[phases.setup] +nixPkgs = ['...', 'git', 'wget', 'ffmpeg', 'mediainfo'] + +[phases.install] +cmds = ["python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install --no-cache-dir -r requirements.txt"] + +[start] +cmd = "python main.py"