services: change restart policy to unless-stopped
when we stop an app, the service containers are stopped. they start running again on reboot. correct restart policy is "unless-stopped" for all the containers.
This commit is contained in:
@@ -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!
|
||||
|
||||
+1
-1
@@ -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 \
|
||||
|
||||
+6
-6
@@ -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 \
|
||||
|
||||
+1
-1
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user