Merge branch 'master' of ssh://git.infini.ltd:64221/infini/logging-center

This commit is contained in:
silenceqi 2020-03-22 13:42:08 +08:00
commit 646f1badd1
5 changed files with 18 additions and 5 deletions

View File

@ -40,6 +40,12 @@ cnpm run docker:dev
启动完成,稍等片刻,打开 http://localhost:10000/,手动刷新即可看到最新的更改。
#### 手动更新开发镜像
```
docker pull docker.infini.ltd:64443/nodejs-dev:latest
```
### 本地开发环境准备
确保已经安装好`nodejs`(版本大于等于 8.5.0)环境:

View File

@ -4,12 +4,15 @@ const random_endpoints = [
name: "LENOVO",
ip: '192.168.3.1',
status: "active", //active/inactive/unmonitored
last_active: "2020-03-21 11:12:33"
last_active: "2020-03-21 11:12:33",
tag: ["win10"]
},
{
os: "Linux",
name: 'RaspberryPi',
ip: '192.168.3.81',
last_active: "2020-03-21 11:12:33",
tag: ["win10"],
credentials:{
user: "pi",
password: "elastic"
@ -21,6 +24,7 @@ const random_endpoints = [
export default {
'get /endpoints/get_endpoints': function (req, res) {
setTimeout(() => {
res.json(random_endpoints);
}, 3000);

View File

@ -4,7 +4,7 @@ ENV TIME_ZONE=Asia/Shanghai
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories \
&& apk update \
&& apk add --no-cache shadow git nodejs nodejs-current-npm bash vim tar curl python python-dev py-pip gcc libcurl make\
&& apk add --no-cache shadow git nodejs nodejs-current-npm bash vim tar curl python python-dev py-pip gcc g++ libcurl make\
&& usermod -s /bin/bash root \
&& rm -rf /var/cache/apk/*
@ -18,6 +18,8 @@ RUN \
WORKDIR /usr/src/app
COPY package.json /usr/src/app/
COPY docker/entrypoint.sh /
RUN npm install --registry=https://registry.npm.taobao.org

View File

@ -7,8 +7,8 @@ services:
# option 2: build image locally
# build:
# context: ../
# dockerfile: docker/Dockerfile
# context: ../
# dockerfile: docker/Dockerfile
ports:
- 3000:3000

View File

@ -9,7 +9,8 @@ cd /usr/src/app
echo "START INFINI-LOGGING-CENTER v1.0"
if [ ! -f "$lockPath" ]; then
# npm i --production;
npm install --registry=https://registry.npm.taobao.org
# npm i --production;
# npm run autod
npm run dev
else