Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

Revert "fix: Do not pull latest image"

Andras Bacsaibcb84b8126ca
diff --git a/src/routes/services/[id]/ghost/start.json.ts b/src/routes/services/[id]/ghost/start.json.ts
index 2f9861fe44..9e0b4ba11d 100644
--- a/src/routes/services/[id]/ghost/start.json.ts
+++ b/src/routes/services/[id]/ghost/start.json.ts
@@ -114,7 +114,13 @@ 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 a7331d9519..ac0f6a5bb6 100644
--- a/src/routes/services/[id]/languagetool/start.json.ts
+++ b/src/routes/services/[id]/languagetool/start.json.ts
@@ -59,7 +59,13 @@ 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 deeac7e96a..5a5a9d5c09 100644
--- a/src/routes/services/[id]/meilisearch/start.json.ts
+++ b/src/routes/services/[id]/meilisearch/start.json.ts
@@ -64,7 +64,13 @@ 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 2455e1d508..3df1855d06 100644
--- a/src/routes/services/[id]/n8n/start.json.ts
+++ b/src/routes/services/[id]/n8n/start.json.ts
@@ -60,7 +60,13 @@ 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 bc139de214..1642038b3b 100644
--- a/src/routes/services/[id]/nocodb/start.json.ts
+++ b/src/routes/services/[id]/nocodb/start.json.ts
@@ -51,7 +51,13 @@ 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 2ed569f51b..6ca37c5e87 100644
--- a/src/routes/services/[id]/plausibleanalytics/start.json.ts
+++ b/src/routes/services/[id]/plausibleanalytics/start.json.ts
@@ -168,14 +168,15 @@ COPY ./init-db.sh /docker-entrypoint-initdb.d/init-db.sh`;
};
const composeFileDestination = `${workdir}/docker-compose.yaml`;
await fs.writeFile(composeFileDestination, yaml.dump(composeFile));
- try {
- await asyncExecShell(`DOCKER_HOST=${host} docker compose -f ${composeFileDestination} up -d`);
- return {
- status: 200
- };
- } catch (error) {
- return ErrorHandler(error);
+ if (version === 'latest') {
+ await asyncExecShell(`DOCKER_HOST=${host} docker compose -f ${composeFileDestination} pull`);
}
+ 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 207bbd60a7..7a72326e15 100644
--- a/src/routes/services/[id]/uptimekuma/start.json.ts
+++ b/src/routes/services/[id]/uptimekuma/start.json.ts
@@ -58,7 +58,13 @@ 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 2aff0e570e..ae13d90154 100644
--- a/src/routes/services/[id]/vaultwarden/start.json.ts
+++ b/src/routes/services/[id]/vaultwarden/start.json.ts
@@ -60,6 +60,11 @@ 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 553bed54c0..dbe0c120ce 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));
- try {
- await asyncExecShell(`DOCKER_HOST=${host} docker compose -f ${composeFileDestination} up -d`);
- return {
- status: 200
- };
- } catch (error) {
- return ErrorHandler(error);
+
+ 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
+ };
} 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 aea5adab32..c0a28e0bd4 100644
--- a/src/routes/services/[id]/wordpress/start.json.ts
+++ b/src/routes/services/[id]/wordpress/start.json.ts
@@ -105,6 +105,11 @@ 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