From 2c41e2aab6cf29efa67cadaf89dba185b7a00914 Mon Sep 17 00:00:00 2001 From: hlohaus <983577+hlohaus@users.noreply.github.com> Date: Fri, 13 Jun 2025 07:29:30 +0200 Subject: [PATCH] Add live update --- docker/Dockerfile-slim | 9 ++++----- docker/update-cron | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/docker/Dockerfile-slim b/docker/Dockerfile-slim index 2dd28324..b6ba960f 100644 --- a/docker/Dockerfile-slim +++ b/docker/Dockerfile-slim @@ -21,18 +21,17 @@ RUN apt-get update && apt-get upgrade -y \ && apt-get clean \ && rm --recursive --force /var/lib/apt/lists/* /tmp/* /var/tmp/* +RUN mkdir -p $G4F_DIR +RUN chown "${G4F_USER_ID}:${G4F_USER_ID}" $G4F_DIR + USER $G4F_USER_ID WORKDIR $G4F_DIR ENV HOME /home/$G4F_USER ENV PATH "${HOME}/.local/bin:${PATH}" +RUN git clone https://github.com/xtekky/gpt4free.git $G4F_DIR RUN crontab docker/update-cron - -# Create app dir and copy the project's requirements file into it -RUN git clone git@github.com:xtekky/gpt4free.git $G4F_DIR - -# Upgrade pip for the latest features and install the project's Python dependencies. RUN pip install --no-cache-dir -r requirements-slim.txt CMD python -m g4f --debug --reload \ No newline at end of file diff --git a/docker/update-cron b/docker/update-cron index 81e274d9..aeb4ea75 100644 --- a/docker/update-cron +++ b/docker/update-cron @@ -1 +1 @@ -0 * * * * cd /app && python -m etc.update \ No newline at end of file +0 * * * * cd /app && python -m etc.update