添加docker支持

This commit is contained in:
神楽坂喵 2021-01-21 16:45:31 +08:00
parent 06025c3df8
commit 6985255dd9
3 changed files with 22 additions and 1 deletions

9
Dockerfile Normal file
View File

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

12
docker-compose.yml Normal file
View File

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

View File

@ -1,4 +1,4 @@
export SLACK_SIGNING_SECRET=*** export SLACK_SIGNING_SECRET=***
export SLACK_BOT_TOKEN=xoxb-*** 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'