From 74c8d8cc6b6f63ece62351c7943a86aa80b83773 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Thu, 7 Sep 2017 20:09:46 -0700 Subject: [PATCH] set label on the redis container this ensures that redis is stopped when app is stopped and also helps identifying app related containers easily --- src/addons.js | 3 ++- src/apptask.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/addons.js b/src/addons.js index bddcf47e8..eb4279eaf 100644 --- a/src/addons.js +++ b/src/addons.js @@ -644,8 +644,9 @@ function setupRedis(app, options, callback) { } const tag = infra.images.redis.tag, redisName = 'redis-' + app.id; + // note that we do not add appId label because this interferes with the stop/start app logic const cmd = `docker run --restart=always -d --name=${redisName} \ - --label=appId=${app.id} --label=location=${app.location} \ + --label=location=${app.location} \ --net cloudron \ --net-alias ${redisName} \ -m ${memoryLimit/2} \ diff --git a/src/apptask.js b/src/apptask.js index cf6225c41..a6c0f6bcd 100644 --- a/src/apptask.js +++ b/src/apptask.js @@ -131,7 +131,7 @@ function deleteContainers(app, callback) { assert.strictEqual(typeof app, 'object'); assert.strictEqual(typeof callback, 'function'); - debugApp(app, 'deleting containers'); + debugApp(app, 'deleting app containers (app, scheduler)'); docker.deleteContainers(app.id, function (error) { if (error) return callback(new Error('Error deleting container: ' + error));