mirror of
https://github.com//cppla/ServerStatus
synced 2025-06-02 05:39:50 +08:00
一键安装服务端和客户端
This commit is contained in:
parent
f2c63aa607
commit
b61cdabd46
autodeploy
18
autodeploy/Dockerfile
Executable file
18
autodeploy/Dockerfile
Executable file
@ -0,0 +1,18 @@
|
||||
FROM nginx
|
||||
|
||||
MAINTAINER cppla https://cpp.la
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get -y install gcc g++ make git
|
||||
RUN git clone https://github.com/cppla/ServerStatus
|
||||
RUN cp -rf /ServerStatus/web/* /usr/share/nginx/html/
|
||||
|
||||
|
||||
WORKDIR /ServerStatus/server
|
||||
|
||||
RUN make
|
||||
RUN pwd && ls -a
|
||||
|
||||
EXPOSE 80 35601
|
||||
|
||||
CMD nohup sh -c '/etc/init.d/nginx start && /ServerStatus/server/sergate --config=/ServerStatus/server/config.json --web-dir=/usr/share/nginx/html'
|
37
autodeploy/config.json
Executable file
37
autodeploy/config.json
Executable file
@ -0,0 +1,37 @@
|
||||
{"servers":
|
||||
[
|
||||
{
|
||||
"username": "s01",
|
||||
"name": "node1",
|
||||
"type": "xen",
|
||||
"host": "host1",
|
||||
"location": "cn",
|
||||
"password": "USER_DEFAULT_PASSWORD"
|
||||
},
|
||||
{
|
||||
"username": "s02",
|
||||
"name": "node2",
|
||||
"type": "vmware",
|
||||
"host": "host2",
|
||||
"location": "jp",
|
||||
"password": "USER_DEFAULT_PASSWORD"
|
||||
},
|
||||
{
|
||||
"disabled": true,
|
||||
"username": "s03",
|
||||
"name": "node3",
|
||||
"type": "Nothing",
|
||||
"host": "host3",
|
||||
"location": "fr",
|
||||
"password": "USER_DEFAULT_PASSWORD"
|
||||
},
|
||||
{
|
||||
"username": "s04",
|
||||
"name": "ssss",
|
||||
"type": "ssss",
|
||||
"host": "ssss",
|
||||
"location": "ssss",
|
||||
"password": "USER_DEFAULT_PASSWORD"
|
||||
}
|
||||
]
|
||||
}
|
9
autodeploy/readme
Executable file
9
autodeploy/readme
Executable file
@ -0,0 +1,9 @@
|
||||
服务端:
|
||||
|
||||
curl -sSL https://get.docker.com/ | sh #一键安装docker
|
||||
docker build -f Dockerfile-server -t sss .
|
||||
docker run -d --restart=always --name=sss -v {$path}/config.json:/ServerStatus/server/config.json -p {$port}:80 -p {$port}:35601 sss
|
||||
|
||||
客户端:
|
||||
|
||||
wget --no-check-certificate -qO client-linux.py 'https://raw.githubusercontent.com/cppla/ServerStatus/master/clients/client-linux.py' && nohup python client-linux.py SERVER={$SERVER} USER={$USER} >/dev/null 2>&1 &
|
Loading…
x
Reference in New Issue
Block a user