Revert "fix: Do not pull latest image"

This reverts commit dd83e86bc3.
This commit is contained in:
Andras Bacsai
2022-04-06 22:10:48 +02:00
parent dd83e86bc3
commit bcb84b8126
10 changed files with 61 additions and 14 deletions

View File

@@ -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);
}