Skip to content

Commit 7a61b32

Browse files
author
suhas
committed
added commands for final deployment
1 parent 01328f9 commit 7a61b32

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

docker commands to use.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
1. check network
2+
3+
docker network inspect survey-network >/dev/null 2>&1 || docker network create survey-network
4+
5+
2. build images
6+
7+
docker build -t abacws-api -f api/Dockerfile api
8+
docker build -t abacws-visualiser -f visualiser/Dockerfile visualiser
9+
docker build -t rasa-frontend -f rasa-frontend/Dockerfile ./rasa-frontend
10+
docker build -t abacws-sender -f telemetry/Dockerfile .
11+
12+
3. Run containers
13+
14+
docker run -d --name abacws-mongo --restart always -v ./Mongo/mongo-data:/data/db -p 27017:27017 --network survey-network --network-alias mongo mongo
15+
16+
docker run -d --name abacws-api --hostname apihost --restart always -e API_PORT=5000 -e MONGO_URL=mongodb://mongo:27017 -e JWT_SECRET=change-this-jwt-secret-in-production-use-strong-random-string -e SESSION_SECRET=change-this-secret-in-production -e API_KEY=V3rySecur3Pas3word -p 5000:5000 -v ./api/src/api/data:/api/src/api/data --network survey-network --network-alias api --health-cmd='sh -lc "wget -qO- http://localhost:5000/health | grep -q '\''ok'\''"' --health-interval=30s --health-timeout=5s --health-retries=5 abacws-api
17+
18+
docker run -d --name abacws-visualiser --hostname visualiserhost --restart always -p 8090:80 -e WEB_PORT=80 -e API_HOST=api:5000 --network survey-network --network-alias visualiser --label "traefik.enable=true" --label "traefik.http.services.abacws-visualiser.loadbalancer.server.port=80" --label 'traefik.http.routers.abacws-visualiser.rule=Host(`visualiser.abacws.example.com`)' --label "traefik.http.routers.abacws-visualiser.entrypoints=https" --label "traefik.http.routers.abacws-visualiser.tls=true" --health-cmd='sh -lc "wget -qO- http://localhost/health | grep -q '\''ok'\''"' --health-interval=30s --health-timeout=10s --health-retries=5 abacws-visualiser
19+
20+
docker run -d --name rasa-frontend-bldg1 --hostname rasa-frontend-host-bldg1 --restart unless-stopped -p 3000:3000 -v ./rasa-frontend/:/app -v /app/node_modules -e NODE_ENV=development -e REACT_APP_API_URL=http://localhost:5000/api -e REACT_APP_VISUALIZER_URL=http://localhost:8090 --network survey-network rasa-frontend npm start
21+
22+
docker run -d --name abacws-sender --restart always -e API_BASE=http://api:5000/api -e INTERVAL_SECONDS=10 -e API_HEALTH=http://api:5000/health -e VIS_HEALTH=http://visualiser:80/health -p 8088:8088 --network survey-network --health-cmd='wget -qO- http://localhost:8088/health | grep ok' --health-interval=30s --health-timeout=5s --health-retries=5 abacws-sender

0 commit comments

Comments
 (0)