diff --git a/src/infra_version.js b/src/infra_version.js index bf8aa1331..df7b1088c 100644 --- a/src/infra_version.js +++ b/src/infra_version.js @@ -6,7 +6,7 @@ exports = module.exports = { // a version change recreates all containers with latest docker config - 'version': '49.8.0', + 'version': '49.9.0', // a major version bump in the db containers will trigger the restore logic that uses the db dumps // docker inspect --format='{{index .RepoDigests 0}}' $IMAGE to get the sha256 . note this has registry in it because manifest id is registry specific! diff --git a/src/mailserver.js b/src/mailserver.js index 13b35e6cf..d8554b8c6 100644 --- a/src/mailserver.js +++ b/src/mailserver.js @@ -175,7 +175,7 @@ async function configureMail(mailFqdn, mailDomain, serviceConfig) { const cmd = serviceConfig.recoveryMode ? '/bin/bash -c \'echo "Debug mode. Sleeping" && sleep infinity\'' : ''; const logLevel = serviceConfig.recoveryMode ? 'data' : 'info'; - const runCmd = `docker run --restart=always -d --name=mail \ + const runCmd = `docker run --restart=unless-stopped -d --name=mail \ --net cloudron \ --net-alias mail \ --log-driver syslog \ diff --git a/src/services.js b/src/services.js index 42e46154f..43d3130c1 100644 --- a/src/services.js +++ b/src/services.js @@ -1022,7 +1022,7 @@ async function startTurn(existingInfra) { // despite --userland-proxy=false, docker create a firewall rule for each port in a range. this takes over 20s to start/stop containers // constants.TURN_PORT, constants.TURN_TLS_PORT, constants.TURN_UDP_PORT_START, constants.TURN_UDP_PORT_END are exposed automatically in host mode // https://github.com/moby/moby/issues/8356 and https://github.com/moby/moby/issues/14856 https://github.com/moby/moby/issues/36214 - const runCmd = `docker run --restart=always -d --name=turn \ + const runCmd = `docker run --restart=unless-stopped -d --name=turn \ --hostname turn \ --net host \ --log-driver syslog \ @@ -1232,7 +1232,7 @@ async function startMysql(existingInfra) { const cmd = serviceConfig.recoveryMode ? '/bin/bash -c \'echo "Debug mode. Sleeping" && sleep infinity\'' : ''; // memory options are applied dynamically. import requires all the memory we can get - const runCmd = `docker run --restart=always -d --name=mysql \ + const runCmd = `docker run --restart=unless-stopped -d --name=mysql \ --hostname mysql \ --net cloudron \ --net-alias mysql \ @@ -1453,7 +1453,7 @@ async function startPostgresql(existingInfra) { const cmd = serviceConfig.recoveryMode ? '/bin/bash -c \'echo "Debug mode. Sleeping" && sleep infinity\'' : ''; // memory options are applied dynamically. import requires all the memory we can get - const runCmd = `docker run --restart=always -d --name=postgresql \ + const runCmd = `docker run --restart=unless-stopped -d --name=postgresql \ --hostname postgresql \ --net cloudron \ --net-alias postgresql \ @@ -1600,7 +1600,7 @@ async function startMongodb(existingInfra) { const cmd = serviceConfig.recoveryMode ? '/bin/bash -c \'echo "Debug mode. Sleeping" && sleep infinity\'' : ''; // memory options are applied dynamically. import requires all the memory we can get - const runCmd = `docker run --restart=always -d --name=mongodb \ + const runCmd = `docker run --restart=unless-stopped -d --name=mongodb \ --hostname mongodb \ --net cloudron \ --net-alias mongodb \ @@ -1776,7 +1776,7 @@ async function startGraphite(existingInfra) { const cmd = serviceConfig.recoveryMode ? '/bin/bash -c \'echo "Debug mode. Sleeping" && sleep infinity\'' : ''; // port 2003 is used by collectd - const runCmd = `docker run --restart=always -d --name=graphite \ + const runCmd = `docker run --restart=unless-stopped -d --name=graphite \ --hostname graphite \ --net cloudron \ --net-alias graphite \ @@ -1923,7 +1923,7 @@ async function setupRedis(app, options) { const image = infra.images.redis; const label = app.fqdn; // note that we do not add appId label because this interferes with the stop/start app logic - const runCmd = `docker run --restart=always -d --name=${redisName} \ + const runCmd = `docker run --restart=unless-stopped -d --name=${redisName} \ --hostname ${redisName} \ --label=location=${label} \ --net cloudron \ diff --git a/src/sftp.js b/src/sftp.js index 0ddc1281b..f268d238f 100644 --- a/src/sftp.js +++ b/src/sftp.js @@ -101,7 +101,7 @@ async function start(existingInfra) { const cmd = serviceConfig.recoveryMode ? '/bin/bash -c \'echo "Debug mode. Sleeping" && sleep infinity\'' : ''; const volumeMounts = dataDirs.map(v => `-v "${v.hostDir}:${v.mountDir}"`).join(' '); - const runCmd = `docker run --restart=always -d --name=sftp \ + const runCmd = `docker run --restart=unless-stopped -d --name=sftp \ --hostname sftp \ --net cloudron \ --net-alias sftp \