-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
64 lines (48 loc) · 2.36 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
##SmartAdaptiveCaseManagement
This is a NodeJS server implementation of SACM, a wrapper of SocioCortex which parses case definition in XML and make corresponding API calls to create defined objects in SocioCortex.
Install API Doc globally:
npm install apidoc -g
## Usage:
1. ) Start APIDoc
apidoc -i app/routes -o doc/assets/api -t doc/sections/api
## Deploy
1.) Update Sociocortex:
Tag a Sociocortex commit with `docker-build-x’ (where x is the number of the build) on BitBucket to trigger the build process of the container.
2.) Update the SACM:
Push the code to the Github repository and trigger the build process via the web hook provide by DockerHub (POST REQUEST to https://registry.hub.docker.com/u/padho/sacm/trigger/-SECRET-)
https://registry.hub.docker.com/u/sebis/sacm/trigger/-SECRET-
3.) Once everything is build, connect to the CONNECARE server. Make sure your SSH keys are properly installed.
4.) Once logged in, go to the Sociocortex docker directory:
```
cd /home/ubuntu/eurecat/dockers/sociocortex
sudo docker-compose pull # pull the latest version of the containers
sudo docker-compose stop # stop all currently running containers
sudo docker-compose up -d # restart the containers with the latest version
sudo docker logs sacm.backend --tail 100 -f
sudo docker exec -it sacm.sociocortex bash
```
4.1) Delete all docker images
docker system prune -a
5.) Common Docker commands
```
sudo docker ps
sudo docker logs <containerId> --follow
sudo docker exec -it <containerId> bash
sudo docker stats sacm.frontend sacm.backend sacm.sociocortex sacm.mongo
sudo docker stats $(echo -n $(sudo docker ps --format "{{.Names}}"))
sudo docker update --memory 5GB sacm.mongo
sudo docker stop xcare.thirdparties.container xcare.integration-producer.container xcare.direct-messaging.container xcare.vitalinqconnector.container xcare.notifications-service xcare.generictask.container xcare.apigateway.container xcare.medicaldevices.container xcare.appserver.container xcare.rabbitmq.container xcare.redisserver.container
```
6.) Mongo commands
.find({url:{$regex : ".*humantasks/1pejs4af5xzr7/complete*"}})
7.) Useful stuff
Disk size usage
find / -size +50M -type f -exec du -h {} \; | sort -n
df -h
docker rmi <reponame>
sudo docker images
sudo docker image prune
sudo docker system prune
sudo docker images -q |susudo xargs docker rmi (funktiniert)
8.) Git
git log --all --follow '*.xml'