File tree Expand file tree Collapse file tree 4 files changed +8
-5
lines changed
Expand file tree Collapse file tree 4 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ docker run -d --restart=always --name=serverstatus -v ~/serverstatus-config.json
3333
3434` ServerStatus` : docker-compose up -d
3535
36- ` ServerStatus with tgbot` : docker-compose -f docker-compose-telegram.yml up -d
36+ ` ServerStatus with tgbot` : TG_CHAT_ID=你的电报ID TG_BOT_TOKEN=你的电报密钥 docker-compose -f docker-compose-telegram.yml up -d
3737
3838```
3939
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ services:
44 build :
55 context : .
66 dockerfile : Dockerfile
7- image : cppla/serverstatus:latest
7+ image : serverstatus_server
88 container_name : serverstatus
99 restart : unless-stopped
1010 networks :
@@ -20,14 +20,15 @@ services:
2020 build :
2121 context : ./plugin
2222 dockerfile : Dockerfile-telegram
23+ image : serverstatus_bot
2324 container_name : bot4sss
2425 restart : unless-stopped
2526 networks :
2627 serverstatus-network :
2728 ipv4_address : 172.23.0.3
2829 environment :
29- - TG_CHAT_ID=tg_chat_id
30- - TG_BOT_TOKEN=tg_bot_token
30+ - TG_CHAT_ID=${TG_CHAT_ID}
31+ - TG_BOT_TOKEN=${TG_BOT_TOKEN}
3132
3233networks :
3334 serverstatus-network :
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ services:
44 build :
55 context : .
66 dockerfile : Dockerfile
7+ image : serverstatus_server
78 container_name : serverstatus
89 restart : unless-stopped
910 networks :
Original file line number Diff line number Diff line change 1- FROM nyurik/ alpine-python3-requests
1+ FROM python: alpine
22
33LABEL maintainer="lidalao"
44LABEL version="0.0.1"
55LABEL description="Telegram Bot for ServerStatus"
66
77WORKDIR /app
8+ RUN pip install requests
89COPY ./bot-telegram.py .
910CMD [ "python", "./bot-telegram.py" ]
You can’t perform that action at this time.
0 commit comments