Merge branch 'master' of ssh://git.infini.ltd:64221/infini/logging-center
This commit is contained in:
commit
646f1badd1
|
@ -40,6 +40,12 @@ cnpm run docker:dev
|
||||||
|
|
||||||
启动完成,稍等片刻,打开 http://localhost:10000/,手动刷新即可看到最新的更改。
|
启动完成,稍等片刻,打开 http://localhost:10000/,手动刷新即可看到最新的更改。
|
||||||
|
|
||||||
|
#### 手动更新开发镜像
|
||||||
|
|
||||||
|
```
|
||||||
|
docker pull docker.infini.ltd:64443/nodejs-dev:latest
|
||||||
|
```
|
||||||
|
|
||||||
### 本地开发环境准备
|
### 本地开发环境准备
|
||||||
|
|
||||||
确保已经安装好`nodejs`(版本大于等于 8.5.0)环境:
|
确保已经安装好`nodejs`(版本大于等于 8.5.0)环境:
|
||||||
|
|
|
@ -4,12 +4,15 @@ const random_endpoints = [
|
||||||
name: "LENOVO",
|
name: "LENOVO",
|
||||||
ip: '192.168.3.1',
|
ip: '192.168.3.1',
|
||||||
status: "active", //active/inactive/unmonitored
|
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",
|
os: "Linux",
|
||||||
name: 'RaspberryPi',
|
name: 'RaspberryPi',
|
||||||
ip: '192.168.3.81',
|
ip: '192.168.3.81',
|
||||||
|
last_active: "2020-03-21 11:12:33",
|
||||||
|
tag: ["win10"],
|
||||||
credentials:{
|
credentials:{
|
||||||
user: "pi",
|
user: "pi",
|
||||||
password: "elastic"
|
password: "elastic"
|
||||||
|
@ -21,6 +24,7 @@ const random_endpoints = [
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
'get /endpoints/get_endpoints': function (req, res) {
|
'get /endpoints/get_endpoints': function (req, res) {
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
res.json(random_endpoints);
|
res.json(random_endpoints);
|
||||||
}, 3000);
|
}, 3000);
|
||||||
|
|
|
@ -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 \
|
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories \
|
||||||
&& apk update \
|
&& 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 \
|
&& usermod -s /bin/bash root \
|
||||||
&& rm -rf /var/cache/apk/*
|
&& rm -rf /var/cache/apk/*
|
||||||
|
|
||||||
|
@ -18,6 +18,8 @@ RUN \
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
COPY package.json /usr/src/app/
|
COPY package.json /usr/src/app/
|
||||||
|
COPY docker/entrypoint.sh /
|
||||||
|
|
||||||
|
|
||||||
RUN npm install --registry=https://registry.npm.taobao.org
|
RUN npm install --registry=https://registry.npm.taobao.org
|
||||||
|
|
||||||
|
|
|
@ -7,8 +7,8 @@ services:
|
||||||
|
|
||||||
# option 2: build image locally
|
# option 2: build image locally
|
||||||
# build:
|
# build:
|
||||||
# context: ../
|
# context: ../
|
||||||
# dockerfile: docker/Dockerfile
|
# dockerfile: docker/Dockerfile
|
||||||
|
|
||||||
ports:
|
ports:
|
||||||
- 3000:3000
|
- 3000:3000
|
||||||
|
|
|
@ -9,7 +9,8 @@ cd /usr/src/app
|
||||||
echo "START INFINI-LOGGING-CENTER v1.0"
|
echo "START INFINI-LOGGING-CENTER v1.0"
|
||||||
|
|
||||||
if [ ! -f "$lockPath" ]; then
|
if [ ! -f "$lockPath" ]; then
|
||||||
# npm i --production;
|
npm install --registry=https://registry.npm.taobao.org
|
||||||
|
# npm i --production;
|
||||||
# npm run autod
|
# npm run autod
|
||||||
npm run dev
|
npm run dev
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue