Support docker deployment

This commit is contained in:
hibobmaster 2023-03-09 23:40:34 +08:00
parent c87a4d3476
commit 3a57f4bddd
No known key found for this signature in database
GPG Key ID: 316B77D7914D713C
2 changed files with 21 additions and 0 deletions

13
Dockerfile Normal file
View File

@ -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

8
compose.yaml Normal file
View File

@ -0,0 +1,8 @@
services:
app:
container_name: matrix_chatgpt_bot
build:
context: .
dockerfile: ./Dockerfile
volumes:
- ./config.json:/app/config.json