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