Skip to content

Commit 4792821

Browse files
author
oc
committed
docker compose for X86 and ARM, good luck
1 parent 6c92620 commit 4792821

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

docker-compose-telegram.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff 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

3233
networks:
3334
serverstatus-network:

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff 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:

plugin/Dockerfile-telegram

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
FROM nyurik/alpine-python3-requests
1+
FROM python:alpine
22

33
LABEL maintainer="lidalao"
44
LABEL version="0.0.1"
55
LABEL description="Telegram Bot for ServerStatus"
66

77
WORKDIR /app
8+
RUN pip install requests
89
COPY ./bot-telegram.py .
910
CMD [ "python", "./bot-telegram.py" ]

0 commit comments

Comments
 (0)