From d26a485e78c80e95a8927215cb7af88e48e90611 Mon Sep 17 00:00:00 2001 From: Shiham Abdul Rahman Date: Tue, 11 Apr 2023 10:25:16 +0500 Subject: [PATCH] fishie --- honestyui-build.sh | 14 ++++++++++++++ public/cgi-bin/trigger-honestyui-build.cgi | 3 +++ public/index.html | 1 + start_service.sh | 5 +++++ 4 files changed, 23 insertions(+) create mode 100755 honestyui-build.sh create mode 100755 public/cgi-bin/trigger-honestyui-build.cgi create mode 100644 public/index.html create mode 100755 start_service.sh diff --git a/honestyui-build.sh b/honestyui-build.sh new file mode 100755 index 0000000..9fc2c88 --- /dev/null +++ b/honestyui-build.sh @@ -0,0 +1,14 @@ +#!/bin/bash + +echo "Content-type: text/html" +echo "" + +cd ~/cicd/Fishie-Honesty-UI/ +git pull +docker compose -f .build/docker-compose.yml build +docker compose -f .build/docker-compose.yml push +ssh dc1.shihaam.me -p 2222 -t 'cd /mnt/vol3/www/honestyui; docker compose pull; docker compose down; docker compose up -d' +cd - + +echo "" +echo "prolly done, check for yourself" diff --git a/public/cgi-bin/trigger-honestyui-build.cgi b/public/cgi-bin/trigger-honestyui-build.cgi new file mode 100755 index 0000000..3623a89 --- /dev/null +++ b/public/cgi-bin/trigger-honestyui-build.cgi @@ -0,0 +1,3 @@ +#!/bin/bash + +$(pwd)/honestyui-build.sh diff --git a/public/index.html b/public/index.html new file mode 100644 index 0000000..e965047 --- /dev/null +++ b/public/index.html @@ -0,0 +1 @@ +Hello diff --git a/start_service.sh b/start_service.sh new file mode 100755 index 0000000..ff44bbf --- /dev/null +++ b/start_service.sh @@ -0,0 +1,5 @@ +#!/bin/bash +cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 +SCREEN=$(basename $(pwd)) +screen -S $SCREEN -p 0 -X quit +screen -S $SCREEN -U -m -d python3 -m http.server --cgi --directory public 8012