diff --git a/dev-scripts/dev-clean-run-as-dev.sh b/dev-scripts/dev-clean-run-as-dev.sh index a2b730f..bc4eac0 100755 --- a/dev-scripts/dev-clean-run-as-dev.sh +++ b/dev-scripts/dev-clean-run-as-dev.sh @@ -11,15 +11,15 @@ sleep 1s docker secret rm captain-salt docker build -t captain-debug -f dockerfile-captain.debug . rm -rf /captain && mkdir /captain +mkdir -p /captain/data/shared-logs chmod -R 777 /captain -# Add to run on differnt ports -# -e "CAPTAIN_HOST_HTTP_PORT=10080" \ -# -e "CAPTAIN_HOST_HTTPS_PORT=10443" \ -# -e "CAPTAIN_HOST_ADMIN_PORT=13000" \ docker run \ -e "CAPTAIN_IS_DEBUG=1" \ -e "MAIN_NODE_IP_ADDRESS=127.0.0.1" \ + -e "CAPTAIN_HOST_HTTP_PORT=10083" \ + -e "CAPTAIN_HOST_HTTPS_PORT=10443" \ + -e "CAPTAIN_HOST_ADMIN_PORT=13000" \ -v /var/run/docker.sock:/var/run/docker.sock \ -v /captain:/captain \ -v $(pwd):/usr/src/app captain-debug diff --git a/src/datastore/DataStore.ts b/src/datastore/DataStore.ts index e515dd0..48b80b9 100644 --- a/src/datastore/DataStore.ts +++ b/src/datastore/DataStore.ts @@ -4,8 +4,8 @@ import Configstore = require('configstore') import fs = require('fs-extra') import { - AutomatedCleanupConfigsCleaner, - IAutomatedCleanupConfigs, + AutomatedCleanupConfigsCleaner, + IAutomatedCleanupConfigs, } from '../models/AutomatedCleanupConfigs' import CapRoverTheme from '../models/CapRoverTheme' import { GoAccessInfo } from '../models/GoAccessInfo' @@ -249,8 +249,11 @@ class DataStore { const goAccessInfo = (self.data.get(GOACCESS_INFO) || {}) as GoAccessInfo goAccessInfo.isEnabled = goAccessInfo.isEnabled || false - goAccessInfo.data.rotationFrequencyCron = - goAccessInfo.data.rotationFrequencyCron ?? '0 0 1 * *' // monthly + if(!goAccessInfo.data) { + goAccessInfo.data = { + rotationFrequencyCron:'0 0 1 * *' // monthly + } + } return Promise.resolve(goAccessInfo) } diff --git a/src/utils/CaptainConstants.ts b/src/utils/CaptainConstants.ts index da34e58..f9bd84a 100644 --- a/src/utils/CaptainConstants.ts +++ b/src/utils/CaptainConstants.ts @@ -247,7 +247,7 @@ if (data.isDebug) { data.debugSourceDirectory = devDirectoryOnLocalMachine data.configs.publishedNameOnDockerHub = 'captain-debug' - data.configs.nginxPortNumber80 = 80 + // data.configs.nginxPortNumber80 = 80 } export default data