diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..e99f587 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +.* +Dockerfile +LICENSE +README.md +renovate.json +permissions_required.txt diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..285bbce --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +# see https://editorconfig.org/ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_style = space +indent_size = 4 +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false + +[*.{yml,yaml}] +indent_size = 2 diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 52017d3..ea5db82 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -4,6 +4,7 @@ "ms-python.python", "ms-python.debugpy", "charliermarsh.ruff", - "alexcvzz.vscode-sqlite" + "alexcvzz.vscode-sqlite", + "editorconfig.editorconfig" ] -} \ No newline at end of file +} diff --git a/Dockerfile b/Dockerfile index 094b885..454effa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,17 +3,13 @@ FROM python:3.12.3-slim # install dependencies RUN apt-get update && apt-get -y upgrade && apt-get -y install git sqlite3 +# install uv +COPY --from=ghcr.io/astral-sh/uv:0.6.5 /uv /uvx /bin/ + +COPY . /home + +# Sync the project into a new environment, using the frozen lockfile WORKDIR /home +RUN uv sync --frozen --no-dev -COPY DakinySettings.py DakinySettings.py -COPY main.py main.py -COPY utils.py utils.py -COPY pyproject.toml pyproject.toml - -COPY classes classes/ -COPY cogs cogs/ -COPY database_setup database_setup/ - -RUN pip install --upgrade pip && pip install poetry && poetry export -f requirements.txt --output requirements.txt && pip install -r requirements.txt - -CMD ["python3", "-u", "./main.py"] \ No newline at end of file +CMD ["uv", "run", "--frozen", "--no-dev", "-m", "dakiny_bot"]