From 6985255dd94955c0b6515e2bca8231ff4fd3df9e Mon Sep 17 00:00:00 2001 From: KagurazakaNyaa Date: Thu, 21 Jan 2021 16:45:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0docker=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 9 +++++++++ docker-compose.yml | 12 ++++++++++++ example.env | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ec426bd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM python +ADD app.py requirements.txt /app/ +ENV SLACK_SIGNING_SECRET=*** +ENV SLACK_BOT_TOKEN=xoxb-*** +ENV DINGTALK_WEBHOOK='https://oapi.dingtalk.com/robot/send?access_token=这里填写自己钉钉群自定义机器人的token' +WORKDIR /app +RUN pip install -r requirements.txt +RUN chmod +x app.py +ENTRYPOINT [ "python", "app.py" ] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..9967feb --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,12 @@ +version: '3' +services: + app: + build: . + ports: + - 3000:3000 + restart: unless-stopped + environment: + - SLACK_SIGNING_SECRET=*** + - SLACK_BOT_TOKEN=xoxb-*** + - DINGTALK_WEBHOOK='https://oapi.dingtalk.com/robot/send?access_token=这里填写自己钉钉群自定义机器人的token' + \ No newline at end of file diff --git a/example.env b/example.env index 3dcc496..1c70011 100644 --- a/example.env +++ b/example.env @@ -1,4 +1,4 @@ export SLACK_SIGNING_SECRET=*** export SLACK_BOT_TOKEN=xoxb-*** -export DINGTALK_WEBHOOK = 'https://oapi.dingtalk.com/robot/send?access_token=这里填写自己钉钉群自定义机器人的token' +export DINGTALK_WEBHOOK='https://oapi.dingtalk.com/robot/send?access_token=这里填写自己钉钉群自定义机器人的token'