consterror="docker/docker-compose has not been installed, please follow instructions at: https://docs.budibase.com/self-hosting/hosting-methods/docker-compose#installing-docker"
consterror=
"docker/docker-compose has not been installed, please follow instructions at: https://docs.budibase.com/self-hosting/hosting-methods/docker-compose#installing-docker"
constdocker=awaitlookpath("docker")
constcompose=awaitlookpath("docker-compose")
if(!docker||!compose){
@ -51,7 +52,9 @@ async function handleError(func) {
asyncfunctioninit(){
awaitcheckDockerConfigured()
constshouldContinue=awaitconfirmation("This will create multiple files in current directory, should continue?")
constshouldContinue=awaitconfirmation(
"This will create multiple files in current directory, should continue?"
)
if(!shouldContinue){
console.log("Stopping.")
return
@ -66,9 +69,13 @@ async function start() {
console.log(info("Starting services, this may take a moment."))
constport=envFile.get("MAIN_PORT")
awaithandleError(async()=>{
awaitcompose.upAll({cwd:"./",log:false})
awaitcompose.upAll({cwd:"./",log:false})
})
console.log(success(`Services started, please go to http://localhost:${port} for next steps.`))
console.log(
success(
`Services started, please go to http://localhost:${port} for next steps.`
)
)
}
asyncfunctionstatus(){
@ -94,7 +101,11 @@ async function stop() {
asyncfunctionupdate(){
awaitcheckDockerConfigured()
checkInitComplete()
if(awaitconfirmation("Do you wish to update you docker-compose.yaml and envoy.yaml?")){
if(
awaitconfirmation(
"Do you wish to update you docker-compose.yaml and envoy.yaml?"
)
){
awaitdownloadFiles()
}
awaithandleError(async()=>{
@ -106,7 +117,7 @@ async function update() {
awaitcompose.stop()
}
console.log(info("Beginning update, this may take a few minutes."))