From 084dc3a0bb9b36b2e267a4c5609f886683161e40 Mon Sep 17 00:00:00 2001 From: Nicolas Mahe Date: Thu, 6 Jun 2019 18:23:02 +0700 Subject: [PATCH 1/4] Remove useless and update env to start the engine --- src/docker-command.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/docker-command.ts b/src/docker-command.ts index 698902a..cda9fba 100644 --- a/src/docker-command.ts +++ b/src/docker-command.ts @@ -95,12 +95,10 @@ export default abstract class extends Command { 'com.docker.stack.namespace': options.name }, Env: [ - 'MESG_SERVER_ADDRESS=:50052', `MESG_LOG_FORMAT=${options.format}`, `MESG_LOG_LEVEL=${options.level}`, `MESG_LOG_FORCECOLORS=${options.colors}`, - `MESG_CORE_NAME=${options.name}`, - 'MESG_CORE_PATH=/mesg', + `MESG_NAME=${options.name}`, ], Mounts: [{ Source: '/var/run/docker.sock', From ddc4432e459a001816e8b8fafd4ba05146a18dbd Mon Sep 17 00:00:00 2001 From: Nicolas Mahe Date: Thu, 6 Jun 2019 18:23:19 +0700 Subject: [PATCH 2/4] Use options.name for the alias of the engine on the shared network --- src/docker-command.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/docker-command.ts b/src/docker-command.ts index cda9fba..1bde5f0 100644 --- a/src/docker-command.ts +++ b/src/docker-command.ts @@ -111,7 +111,10 @@ export default abstract class extends Command { }], }, Networks: [ - {Target: network.id, Alias: 'core'}, + { + Target: network.id, + Alias: options.name, + }, ] }, EndpointSpec: { From 38c60a57c370f0314ceb18bc89cff50d3c0d9205 Mon Sep 17 00:00:00 2001 From: Nicolas Mahe Date: Fri, 7 Jun 2019 12:26:40 +0700 Subject: [PATCH 3/4] Update docker mount path to /home/root/.mesg --- src/docker-command.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docker-command.ts b/src/docker-command.ts index 1bde5f0..572352b 100644 --- a/src/docker-command.ts +++ b/src/docker-command.ts @@ -106,7 +106,7 @@ export default abstract class extends Command { Type: 'bind', }, { Source: join(homedir(), '.mesg'), - Target: '/mesg', + Target: '/home/root/.mesg', Type: 'bind', }], }, From fa528920313c56506d50bfa3aa0c84d88bdcc9d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Mah=C3=A9?= Date: Fri, 7 Jun 2019 18:12:44 +0700 Subject: [PATCH 4/4] Fix docker root home to /root --- src/docker-command.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docker-command.ts b/src/docker-command.ts index 572352b..1c195f7 100644 --- a/src/docker-command.ts +++ b/src/docker-command.ts @@ -106,7 +106,7 @@ export default abstract class extends Command { Type: 'bind', }, { Source: join(homedir(), '.mesg'), - Target: '/home/root/.mesg', + Target: '/root/.mesg', Type: 'bind', }], },