diff --git a/src/routes/services/[id]/ghost/start.json.ts b/src/routes/services/[id]/ghost/start.json.ts index 9e0b4ba11..2f9861fe4 100644 --- a/src/routes/services/[id]/ghost/start.json.ts +++ b/src/routes/services/[id]/ghost/start.json.ts @@ -114,13 +114,7 @@ export const post: RequestHandler = async (event) => { }; const composeFileDestination = `${workdir}/docker-compose.yaml`; await fs.writeFile(composeFileDestination, yaml.dump(composeFile)); - try { - if (version === 'latest') { - await asyncExecShell( - `DOCKER_HOST=${host} docker compose -f ${composeFileDestination} pull` - ); - } await asyncExecShell(`DOCKER_HOST=${host} docker compose -f ${composeFileDestination} up -d`); return { status: 200 diff --git a/src/routes/services/[id]/languagetool/start.json.ts b/src/routes/services/[id]/languagetool/start.json.ts index ac0f6a5bb..a7331d951 100644 --- a/src/routes/services/[id]/languagetool/start.json.ts +++ b/src/routes/services/[id]/languagetool/start.json.ts @@ -59,13 +59,7 @@ export const post: RequestHandler = async (event) => { }; const composeFileDestination = `${workdir}/docker-compose.yaml`; await fs.writeFile(composeFileDestination, yaml.dump(composeFile)); - try { - if (version === 'latest') { - await asyncExecShell( - `DOCKER_HOST=${host} docker compose -f ${composeFileDestination} pull` - ); - } await asyncExecShell(`DOCKER_HOST=${host} docker compose -f ${composeFileDestination} up -d`); return { status: 200 diff --git a/src/routes/services/[id]/meilisearch/start.json.ts b/src/routes/services/[id]/meilisearch/start.json.ts index 5a5a9d5c0..deeac7e96 100644 --- a/src/routes/services/[id]/meilisearch/start.json.ts +++ b/src/routes/services/[id]/meilisearch/start.json.ts @@ -64,13 +64,7 @@ export const post: RequestHandler = async (event) => { }; const composeFileDestination = `${workdir}/docker-compose.yaml`; await fs.writeFile(composeFileDestination, yaml.dump(composeFile)); - try { - if (version === 'latest') { - await asyncExecShell( - `DOCKER_HOST=${host} docker compose -f ${composeFileDestination} pull` - ); - } await asyncExecShell(`DOCKER_HOST=${host} docker compose -f ${composeFileDestination} up -d`); return { status: 200 diff --git a/src/routes/services/[id]/n8n/start.json.ts b/src/routes/services/[id]/n8n/start.json.ts index 3df1855d0..2455e1d50 100644 --- a/src/routes/services/[id]/n8n/start.json.ts +++ b/src/routes/services/[id]/n8n/start.json.ts @@ -60,13 +60,7 @@ export const post: RequestHandler = async (event) => { }; const composeFileDestination = `${workdir}/docker-compose.yaml`; await fs.writeFile(composeFileDestination, yaml.dump(composeFile)); - try { - if (version === 'latest') { - await asyncExecShell( - `DOCKER_HOST=${host} docker compose -f ${composeFileDestination} pull` - ); - } await asyncExecShell(`DOCKER_HOST=${host} docker compose -f ${composeFileDestination} up -d`); return { status: 200 diff --git a/src/routes/services/[id]/nocodb/start.json.ts b/src/routes/services/[id]/nocodb/start.json.ts index 1642038b3..bc139de21 100644 --- a/src/routes/services/[id]/nocodb/start.json.ts +++ b/src/routes/services/[id]/nocodb/start.json.ts @@ -51,13 +51,7 @@ export const post: RequestHandler = async (event) => { }; const composeFileDestination = `${workdir}/docker-compose.yaml`; await fs.writeFile(composeFileDestination, yaml.dump(composeFile)); - try { - if (version === 'latest') { - await asyncExecShell( - `DOCKER_HOST=${host} docker compose -f ${composeFileDestination} pull` - ); - } await asyncExecShell(`DOCKER_HOST=${host} docker compose -f ${composeFileDestination} up -d`); return { status: 200 diff --git a/src/routes/services/[id]/plausibleanalytics/start.json.ts b/src/routes/services/[id]/plausibleanalytics/start.json.ts index 6ca37c5e8..2ed569f51 100644 --- a/src/routes/services/[id]/plausibleanalytics/start.json.ts +++ b/src/routes/services/[id]/plausibleanalytics/start.json.ts @@ -168,15 +168,14 @@ COPY ./init-db.sh /docker-entrypoint-initdb.d/init-db.sh`; }; const composeFileDestination = `${workdir}/docker-compose.yaml`; await fs.writeFile(composeFileDestination, yaml.dump(composeFile)); - if (version === 'latest') { - await asyncExecShell(`DOCKER_HOST=${host} docker compose -f ${composeFileDestination} pull`); + try { + await asyncExecShell(`DOCKER_HOST=${host} docker compose -f ${composeFileDestination} up -d`); + return { + status: 200 + }; + } catch (error) { + return ErrorHandler(error); } - await asyncExecShell( - `DOCKER_HOST=${host} docker compose -f ${composeFileDestination} up --build -d` - ); - return { - status: 200 - }; } catch (error) { return ErrorHandler(error); } diff --git a/src/routes/services/[id]/uptimekuma/start.json.ts b/src/routes/services/[id]/uptimekuma/start.json.ts index 7a72326e1..207bbd60a 100644 --- a/src/routes/services/[id]/uptimekuma/start.json.ts +++ b/src/routes/services/[id]/uptimekuma/start.json.ts @@ -58,13 +58,7 @@ export const post: RequestHandler = async (event) => { }; const composeFileDestination = `${workdir}/docker-compose.yaml`; await fs.writeFile(composeFileDestination, yaml.dump(composeFile)); - try { - if (version === 'latest') { - await asyncExecShell( - `DOCKER_HOST=${host} docker compose -f ${composeFileDestination} pull` - ); - } await asyncExecShell(`DOCKER_HOST=${host} docker compose -f ${composeFileDestination} up -d`); return { status: 200 diff --git a/src/routes/services/[id]/vaultwarden/start.json.ts b/src/routes/services/[id]/vaultwarden/start.json.ts index ae13d9015..2aff0e570 100644 --- a/src/routes/services/[id]/vaultwarden/start.json.ts +++ b/src/routes/services/[id]/vaultwarden/start.json.ts @@ -60,11 +60,6 @@ export const post: RequestHandler = async (event) => { const composeFileDestination = `${workdir}/docker-compose.yaml`; await fs.writeFile(composeFileDestination, yaml.dump(composeFile)); try { - if (version === 'latest') { - await asyncExecShell( - `DOCKER_HOST=${host} docker compose -f ${composeFileDestination} pull` - ); - } await asyncExecShell(`DOCKER_HOST=${host} docker compose -f ${composeFileDestination} up -d`); return { status: 200 diff --git a/src/routes/services/[id]/vscodeserver/start.json.ts b/src/routes/services/[id]/vscodeserver/start.json.ts index dbe0c120c..553bed54c 100644 --- a/src/routes/services/[id]/vscodeserver/start.json.ts +++ b/src/routes/services/[id]/vscodeserver/start.json.ts @@ -68,14 +68,14 @@ export const post: RequestHandler = async (event) => { }; const composeFileDestination = `${workdir}/docker-compose.yaml`; await fs.writeFile(composeFileDestination, yaml.dump(composeFile)); - - if (version === 'latest') { - await asyncExecShell(`DOCKER_HOST=${host} docker compose -f ${composeFileDestination} pull`); + try { + await asyncExecShell(`DOCKER_HOST=${host} docker compose -f ${composeFileDestination} up -d`); + return { + status: 200 + }; + } catch (error) { + return ErrorHandler(error); } - await asyncExecShell(`DOCKER_HOST=${host} docker compose -f ${composeFileDestination} up -d`); - return { - status: 200 - }; } catch (error) { return ErrorHandler(error); } diff --git a/src/routes/services/[id]/wordpress/start.json.ts b/src/routes/services/[id]/wordpress/start.json.ts index c0a28e0bd..aea5adab3 100644 --- a/src/routes/services/[id]/wordpress/start.json.ts +++ b/src/routes/services/[id]/wordpress/start.json.ts @@ -105,11 +105,6 @@ export const post: RequestHandler = async (event) => { const composeFileDestination = `${workdir}/docker-compose.yaml`; await fs.writeFile(composeFileDestination, yaml.dump(composeFile)); try { - if (version === 'latest') { - await asyncExecShell( - `DOCKER_HOST=${host} docker compose -f ${composeFileDestination} pull` - ); - } await asyncExecShell(`DOCKER_HOST=${host} docker compose -f ${composeFileDestination} up -d`); return { status: 200