From bbef18c1daf0411fce86a5e70b746075da749a0e Mon Sep 17 00:00:00 2001 From: Kishan Takoordyal Date: Sun, 21 May 2023 12:33:40 +0000 Subject: [PATCH] Update Section_08/docker-compose.sh, Section_05/swap.sh --- Section_05/swap.sh | 8 ++++++++ Section_08/docker-compose.sh | 25 +++++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 Section_05/swap.sh create mode 100644 Section_08/docker-compose.sh diff --git a/Section_05/swap.sh b/Section_05/swap.sh new file mode 100644 index 0000000..4d2d763 --- /dev/null +++ b/Section_05/swap.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +fallocate -l 2G /swapfile +chmod 600 /swapfile +mkswap /swapfile +swapon /swapfile +echo "/swapfile swap swap defaults 0 0" >> /etc/fstab +swapon --show diff --git a/Section_08/docker-compose.sh b/Section_08/docker-compose.sh new file mode 100644 index 0000000..42d202a --- /dev/null +++ b/Section_08/docker-compose.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +cd ~/ +git clone https://github.com/EdgeKing810/Entities +cd Entities/ +docker compose up -d + +cat init-mongo.js +ls mongo-volume/ +tail api-nodejs/logs/access.log +docker exec -it entities-db mongosh mongodb://root:root@127.0.0.1:27017/entities_db + +docker compose down +docker compose up -d + +docker ps -a +docker logs entities-db +docker logs entities-api +docker logs entities-front + +sudo apt install jq +curl http://localhost:7000/api/v1/reset +curl http://localhost:7000/api/v1/ | jq + +docker compose down