Browse Source

add dummyservice

master
zeus 3 years ago
parent
commit
80637838bc
  1. 8
      docker-compose.yml
  2. 2
      dummyservice/dummyservice.config.js
  3. 15
      dummyservice/install-dummyservice.sh
  4. 8
      dummyservice/start-server.sh

8
docker-compose.yml

@ -35,23 +35,19 @@ services:
networks:
datacollector-net:
readmongo:
image: hub.swarmlab.io:5480/poc-datacollector-readmongo:latest
container_name: readmongo_service
restart: always
depends_on:
- writetomongo
logging:
driver: "fluentd"
options:
fluentd-async-connect: "true"
tag: mongo.node2
build: ./readmongo
image: readmongo:latest
#build: ./readmongo
ports:
- "3000:3000"
# volumes:
# - ./readmongo:/usr/src/app
links:
- mongo
networks:
datacollector-net:
dummy:

2
dummyservice/ecosystem.config.js → dummyservice/dummyservice.config.js

@ -5,7 +5,7 @@ module.exports = {
autorestart: true,
watch: true,
//"script" : "/home/node/swarmlab-app/run/app.js",
cwd: "/usr/src/app/swarmlab-app/src",
cwd: "/home/node/dummyservice/swarmlab-app/src",
script: "run/app.js",
run_as_user: "node",
args: "start",

15
dummyservice/install-dummyservice.sh

@ -0,0 +1,15 @@
#!/bin/sh
BASEDIR=$(dirname $0)
cpwd=$PWD
echo $BASEDIR
cd $BASEDIR
npm i
npm cache clean --force
mkdir -p /home/node/run
mkdir -p /home/node/logs

8
dummyservice/start-server.sh

@ -0,0 +1,8 @@
#!/bin/sh
BASEDIR=$(dirname $0)
cd $BASEDIR
pm2-runtime dummyservice.config.js
Loading…
Cancel
Save