From ca07adbc934204584aacf62498b992b4c1ae084a Mon Sep 17 00:00:00 2001 From: Kumi Date: Tue, 23 Apr 2024 08:42:12 +0200 Subject: [PATCH] refactor(docker): restructure project for improved management Redesigned the Docker setup to enhance project structure and configuration management. Changes include a more organized directory structure within the Docker container, separating source code, project metadata, and licenses explicitly to the `/app` directory for better clarity and management. Additionally, integrated `pantalaimon` as a dependency service in `docker-compose.yml`, enabling secure communication with Matrix services by automatically managing settings and configurations through mounted files. This setup simplifies the development environment setup and streamlines deployments. --- Dockerfile | 7 +++++-- docker-compose.yml | 11 ++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index d889fdd..a1d478e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,10 @@ FROM python:3.12-slim -WORKDIR /usr/src/app -COPY . . +WORKDIR /app +COPY src/ /app/src +COPY pyproject.toml /app +COPY README.md /app +COPY LICENSE /app RUN pip install .[all] diff --git a/docker-compose.yml b/docker-compose.yml index 527e996..af07b0a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,4 +2,13 @@ version: '3.8' services: gptbot: - build: . \ No newline at end of file + build: . + volumes: + - ./settings.ini:/app/settings.ini + + pantalaimon: + image: matrixdotorg/pantalaimon + volumes: + - ./pantalaimon.conf:/etc/pantalaimon/pantalaimon.conf + ports: + - "8010:8010" \ No newline at end of file