Skip to content

Commit

Permalink
Bug Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrewiski committed Feb 17, 2024
1 parent b387451 commit 4b3f2d9
Show file tree
Hide file tree
Showing 27 changed files with 2,320 additions and 2,022 deletions.
12 changes: 5 additions & 7 deletions dockerCompose/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ services:
#image: "ghcr.io/andrewiski/uisp-tools/uisptools:latest"
image: "andrewiski/uisptools:latest"
ports:
- "49443:49443"
- "49080:49080"
- "${UISPTOOLS_HTTPSPORT}:49443"
- "${UISPTOOLS_HTTPPORT}:49080"
volumes:
- ../data/config:/usr/src/uisptools/config
- ../data/log:/usr/src/uisptools/logs
- ../data/logs:/usr/src/uisptools/logs
container_name: uisptools${UISPTOOLS_ALIAS}
environment:
MONGODBSERVERURL: "${MONGODBSERVERURL:-mongodb://uisptools:U!spT00ls!@mongo_mongodb${UISPTOOLS_ALIAS}:27017/}"
Expand All @@ -40,11 +40,9 @@ services:
#- ../data/mongodb/docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d:ro
- ../data/mongodb/docker-entrypoint-initdb.d/01_createDatabase.js:/docker-entrypoint-initdb.d/01_createDatabase.js:ro
- ../data/mongodb/docker-entrypoint-initdb.d/02_initWebServerPages.js:/docker-entrypoint-initdb.d/02_initWebServerPages.js:ro
# this for Production as only need to Expose to internal services inside of Docker
expose:
- "27017"
#Remove this line for Production only here for development direct connect to mongo
ports:
- "27017:27017"
- "${UISPTOOLS_MONGOPORT}:27017"
restart: always
networks:
- express-mongo
Expand Down
2 changes: 1 addition & 1 deletion dockerCompose/installUispTools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fi

# UISPTOOLS variables
export UISPTOOLS_REPO="https://raw.githubusercontent.com/Andrewiski/UISP-Tools/main"
export UISPTOOLS_DOCKER_IMAGE="ghcr.io/andrewiski/uisp-tools/uisptools"
export UISPTOOLS_DOCKER_IMAGE="andrewiski/uisptools"
export UISPTOOLS_VERSION="0.0.3"
export UISPTOOLS_APP_DIR="${HOME_DIR}/app/uisptools"
export UISPTOOLS_DATA_DIR="${HOME_DIR}/data/uisptools"
Expand Down
31 changes: 29 additions & 2 deletions dockerCompose/installUispToolsStandAlone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ MONGODBUSERNAME=""
MONGODBPASSWORD=""
MONGODBDATABASE=""
UNATTENDED=false
UISPTOOLS_HTTPSPORT="49443"
UISPTOOLS_HTTPPORT="49080"
UISPTOOLS_MONGOPORT="27017"

cliexit() {
printf '%s\n' "$1" >&2
Expand All @@ -34,6 +37,30 @@ while :; do
cliexit 'ERROR: "--username" requires a non-empty option argument.'
fi
;;
-httpport) # http port.
if [ "$2" ]; then
UISPTOOLS_HTTPPORT=$2
shift
else
cliexit 'ERROR: "--httpport" requires a non-empty option argument.'
fi
;;
-httpsport) # https port.
if [ "$2" ]; then
UISPTOOLS_HTTPSPORT=$2
shift
else
cliexit 'ERROR: "--httpsport" requires a non-empty option argument.'
fi
;;
-mongoport) # mongo port.
if [ "$2" ]; then
UISPTOOLS_MONGOPORT=$2
shift
else
cliexit 'ERROR: "--mongoport" requires a non-empty option argument.'
fi
;;
-googleapikey) # google api key.
if [ "$2" ]; then
GOOGLEAPIKEY=$2
Expand Down Expand Up @@ -129,7 +156,7 @@ PREREQUISITES=(
"envsubst|gettext-base"
)

HTTP_PORT="49080"

COMPOSE_PROJECT_NAME="andrewiski/uisptools:latest"
COMPOSE_CONTAINER_NAME="uisptools"
USERNAME="${UISPTOOLS_USER:-$USER}"
Expand Down Expand Up @@ -341,7 +368,7 @@ confirm_success() {
UISPTOOLSRunning=true
# env -i is to ensure that http[s]_proxy variables are not set
# Otherwise the check would go through proxy.
env -i curl -skL "http://127.0.0.1:${HTTP_PORT}" > /dev/null && break
env -i curl -skL "http://127.0.0.1:${UISPTOOLS_HTTPPORT}" > /dev/null && break
echo "."
UISPTOOLSRunning=false
n=$((n+1))
Expand Down
22 changes: 11 additions & 11 deletions mongodb/docker-entrypoint-initdb.d/02_initWebServerPages.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ db.ut_PageContent.insert(
"linkStatus" : 1,
"linkTarget" : "_self",
"linkText" : "Home",
"linkUrl" : "/uisptools/",
"linkUrl" : "/",
"pageContentGuid" : "00000000-0000-0000-0000-000000000001",
"pageDescription" : " Website Home Page",
"pageKeywords" : "",
Expand All @@ -37,7 +37,7 @@ db.ut_PageContent.insert(
"linkStatus" : 1,
"linkTarget" : "_self",
"linkText" : "Wifi Service",
"linkUrl" : "/uisptools/ContentPage/WifiService",
"linkUrl" : "/WifiService",
"pageContentGuid" : "57052780-ec76-4026-84ac-47d7697c39ff",
"pageContentId" : 2,
"pageDescription" : "Wireless Internet Service",
Expand All @@ -61,7 +61,7 @@ db.ut_PageContent.insert(
"linkStatus" : 1,
"linkTarget" : "_self",
"linkText" : "Wifi Coverage Map",
"linkUrl" : "/uisptools/ContentPage/WifiCoverage",
"linkUrl" : "/WifiCoverage",
"pageContentGuid" : "57052780-ec76-4026-84ac-47d7697c39aa",
"pageDescription" : "Wireless Coverage",
"pageKeywords" : "",
Expand All @@ -84,7 +84,7 @@ db.ut_PageContent.insert(
"linkStatus" : 1,
"linkTarget" : "_self",
"linkText" : "Admin",
"linkUrl" : "/uisptools/admin/admin.htm",
"linkUrl" : "/admin/admin.htm",
"pageContentGuid" : "dc5370c8-8eee-4557-a146-f4e07423ddad",
"pageDescription" : "Admin Page",
"pageKeywords" : "",
Expand All @@ -108,7 +108,7 @@ db.ut_PageContent.insert(
"linkStatus" : 1,
"linkTarget" : "_self",
"linkText" : "Detect DFS",
"linkUrl" : "/uisptools/uisptools/detectdfs",
"linkUrl" : "/uisptools/detectdfs",
"pageContentGuid" : "ac5370c8-8eae-4557-f146-f4e07423ddcd",
"pageDescription" : "Detect DFS",
"pageKeywords" : "",
Expand All @@ -132,7 +132,7 @@ db.ut_PageContent.insert(
"linkStatus" : 1,
"linkTarget" : "_self",
"linkText" : "FCC Fabric Data",
"linkUrl" : "/uisptools/uisptools/fccfabricdata",
"linkUrl" : "/uisptools/fccfabricdata",
"pageContentGuid" : "ac537058-8ea5-4557-f646-f5e07423ddcd",
"pageDescription" : "FCC Fabric Data",
"pageKeywords" : "",
Expand All @@ -156,7 +156,7 @@ db.ut_PageContent.insert(
"linkStatus" : 1,
"linkTarget" : "_self",
"linkText" : "Test API",
"linkUrl" : "/uisptools/uisptools/testing/testapicalls",
"linkUrl" : "/uisptools/testing/testapicalls",
"pageContentGuid" : "ac5370c8-8e5e-4557-f146-f4e07423afcd",
"pageDescription" : "Test API Calls",
"pageKeywords" : "",
Expand All @@ -180,7 +180,7 @@ db.ut_PageContent.insert(
"linkStatus" : 1,
"linkTarget" : "_self",
"linkText" : "Tower Clients",
"linkUrl" : "/uisptools/wilcowireless/towerclients",
"linkUrl" : "/wilcowireless/towerclients",
"pageContentGuid" : "ad5570c8-8f5e-4557-f146-f4a07423afcd",
"pageDescription" : "Tower Clients",
"pageKeywords" : "",
Expand All @@ -204,7 +204,7 @@ db.ut_PageContent.insert(
"linkStatus" : 1,
"linkTarget" : "_self",
"linkText" : "Frequency Mapper",
"linkUrl" : "/uisptools/wilcowireless/freqmapper",
"linkUrl" : "/wilcowireless/freqmapper",
"pageContentGuid" : "ad5575c8-8f5a-4557-f145-f5c07423afcd",
"pageDescription" : "Frequency Mapper",
"pageKeywords" : "",
Expand All @@ -228,7 +228,7 @@ db.ut_PageContent.insert(
"linkStatus" : 1,
"linkTarget" : "_self",
"linkText" : "AP Map",
"linkUrl" : "/uisptools/digitalexample/apmap",
"linkUrl" : "/digitalexample/apmap",
"pageContentGuid" : "cb5570e8-8f5d-3557-f146-f4a07423afcd",
"pageDescription" : "AP Map",
"pageKeywords" : "",
Expand Down Expand Up @@ -276,7 +276,7 @@ db.ut_PageContent.insert(
"linkStatus" : 1,
"linkTarget" : "_self",
"linkText" : "Privacy Policy",
"linkUrl" : "/uisptools/ContentPage/PrivacyPolicy",
"linkUrl" : "/ContentPage/PrivacyPolicy",
"pageContentGuid" : "57052780-ec76-4026-84ac-47d7697c94ae",
"pageDescription" : "Privacy Policy",
"pageKeywords" : "",
Expand Down
Loading

0 comments on commit 4b3f2d9

Please sign in to comment.