From 3a57f4bddd9e8248d46c2409cb1e4ec49a22b742 Mon Sep 17 00:00:00 2001 From: hibobmaster Date: Thu, 9 Mar 2023 23:40:34 +0800 Subject: [PATCH] Support docker deployment --- Dockerfile | 13 +++++++++++++ compose.yaml | 8 ++++++++ 2 files changed, 21 insertions(+) create mode 100644 Dockerfile create mode 100644 compose.yaml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0c4c439 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM python:3.10-alpine + +RUN sed -i 's|v3\.\d*|edge|' /etc/apk/repositories + +RUN apk add olm-dev gcc musl-dev + +COPY ./ /app + +WORKDIR /app + +RUN pip install -r requirements.txt + +ENTRYPOINT python main.py diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..6e19ddd --- /dev/null +++ b/compose.yaml @@ -0,0 +1,8 @@ +services: + app: + container_name: matrix_chatgpt_bot + build: + context: . + dockerfile: ./Dockerfile + volumes: + - ./config.json:/app/config.json