- Fix restart_policy in Service config.
- Tweaked the upgrade process a bit.
- Refactor and cosmetic surgery here and there.
- Track Service config changes and allow redeploy if it changes.
This commit is contained in:
Andras Bacsai
2021-03-30 21:49:46 +02:00
committed by GitHub
parent 4e69c56bd3
commit b91bfa21b3
18 changed files with 181 additions and 125 deletions

View File

@@ -60,6 +60,10 @@ module.exports = async function (fastify) {
foundDomain = true
}
if (running.repository.id === configuration.repository.id && running.repository.branch === configuration.repository.branch) {
// Base service configuration changed
if (!running.build.container.baseSHA || running.build.container.baseSHA !== configuration.build.container.baseSHA) {
configChanged = true
}
const state = await execShellAsync(`docker stack ps ${running.build.container.name} --format '{{ json . }}'`)
const isError = state.split('\n').filter(n => n).map(s => JSON.parse(s)).filter(n => n.DesiredState !== 'Running')
if (isError.length > 0) forceUpdate = true