From 5edd4e9a0c98e5f312a013e9bf32f5eb8262a06b Mon Sep 17 00:00:00 2001 From: imcompiling Date: Mon, 17 Mar 2025 21:38:19 -0400 Subject: [PATCH] Add dockerignore file and update dockerfile to copy all files. --- .dockerignore | 2 ++ .gitea/template | 3 ++- Dockerfile | 10 +++------- 3 files changed, 7 insertions(+), 8 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..7eaa663 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +.* +Dockerfile diff --git a/.gitea/template b/.gitea/template index 97e7651..fe0afa2 100644 --- a/.gitea/template +++ b/.gitea/template @@ -1,4 +1,5 @@ .gitea/workflows/*.yml main.py pyproject.toml -settings.py \ No newline at end of file +settings.py +Dockerfile \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 0b03a2b..0fe2aba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,14 +3,10 @@ FROM python:3.12.3-slim # install uv COPY --from=ghcr.io/astral-sh/uv:0.6.5 /uv /uvx /bin/ -WORKDIR /home - -COPY config.py config.py -COPY main.py main.py -COPY pyproject.toml pyproject.toml - -COPY cogs cogs/ +COPY . /${REPO_NAME} +# Sync the project into a new environment, using the frozen lockfile +WORKDIR /${REPO_NAME} RUN uv sync --frozen --no-dev CMD ["uv", "run", "./main.py"] \ No newline at end of file