From 2b924b5d25f5aa835daf45bbc7dd566ffbe372ab Mon Sep 17 00:00:00 2001 From: spifory Date: Thu, 12 Feb 2026 17:42:58 +0200 Subject: [PATCH] build: add and update docker with compose --- .dockerignore | 5 +++++ Dockerfile | 8 ++++++-- docker-compose.yaml | 13 +++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 .dockerignore create mode 100644 docker-compose.yaml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..d567855 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,5 @@ +* +!src* +!poetry* +!pyproject.toml +!.env \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 1f2bce6..c00cd2f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,13 @@ -FROM python:3.11-bookworm +FROM python:3.14-slim-trixie + +WORKDIR /sox RUN pip install poetry -COPY . . +COPY pyproject.toml poetry.lock ./ RUN poetry install --without=dev +COPY . . + CMD ["poetry", "run", "python", "-m", "src"] \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..4a58cee --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,13 @@ + +services: + sox: + container_name: sox + pull_policy: build + build: + context: . + dockerfile: Dockerfile + environment: + TOKEN: ${TOKEN?Bot token not provided} + FUN_GUILD: ${FUN_GUILD?Main guild ID not provided} + WELCOME_CHANNEL: $WELCOME_CHANNEL + MEMBER_ROLE: $MEMBER_ROLE \ No newline at end of file