merge start options into hostconfig
This commit is contained in:
@@ -762,10 +762,8 @@ function setupRedis(app, options, callback) {
|
|||||||
'/tmp': {},
|
'/tmp': {},
|
||||||
'/run': {}
|
'/run': {}
|
||||||
},
|
},
|
||||||
VolumesFrom: []
|
VolumesFrom: [],
|
||||||
};
|
HostConfig: {
|
||||||
|
|
||||||
var startOptions = {
|
|
||||||
Binds: [
|
Binds: [
|
||||||
redisVarsFile + ':/etc/redis/redis_vars.sh:ro',
|
redisVarsFile + ':/etc/redis/redis_vars.sh:ro',
|
||||||
redisDataDir + ':/var/lib/redis:rw'
|
redisDataDir + ':/var/lib/redis:rw'
|
||||||
@@ -780,6 +778,7 @@ function setupRedis(app, options, callback) {
|
|||||||
'Name': 'always',
|
'Name': 'always',
|
||||||
'MaximumRetryCount': 0
|
'MaximumRetryCount': 0
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var env = [
|
var env = [
|
||||||
@@ -794,7 +793,7 @@ function setupRedis(app, options, callback) {
|
|||||||
docker.createContainer(createOptions, function (error) {
|
docker.createContainer(createOptions, function (error) {
|
||||||
if (error && error.statusCode !== 409) return callback(error); // if not already created
|
if (error && error.statusCode !== 409) return callback(error); // if not already created
|
||||||
|
|
||||||
redisContainer.start(startOptions, function (error) {
|
redisContainer.start(function (error) {
|
||||||
if (error && error.statusCode !== 304) return callback(error); // if not already running
|
if (error && error.statusCode !== 304) return callback(error); // if not already running
|
||||||
|
|
||||||
appdb.setAddonConfig(app.id, 'redis', env, function (error) {
|
appdb.setAddonConfig(app.id, 'redis', env, function (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user