- Install Docker
- Pull Mongodb
- Pull etms
- Docker Compose
- Run etms
- Preparing Database
- Confirm server running status
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo apt-get update
sudo apt-get install docker-ce
docker pull mongo:latest
docker pull gokulakannan/etms:latest
Create docker-compose.yml
by examples.
version: "3.7"
services:
etms:
image: gokulakannan/etms:latest
deploy:
replicas: 1
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "10"
configs:
- source: env
target: /usr/src/app/.env
ports:
- 3001:3001
depends_on:
- mongo
mongo:
image: mongo:latest
ports:
- 27017:27017
volumes:
- mongo:/data/db
volumes:
mongo:
configs:
env:
file: .env
docker stack deploy -c docker-compose.yml etms-stack-service
Check logs
docker container ls
docker logs <container id>
Run npm run setup
on etms container to add default data and create indexes.
docker container ls
docker exec <container id> bash -c "npm run setup && npm run test"
-
Swagger documentation (http://hostname:port/api-docs)
-
Technical documentation (http://hostname:port/technical-document/)
-
Test Report (http://hostname:port/test-report/)