installer generstes start stop scripts now

This commit is contained in:
jash
2018-10-14 15:08:07 +02:00
committed by kexkey
parent 22eb32cd1f
commit 495033deeb
3 changed files with 24 additions and 2 deletions

View File

@@ -93,8 +93,8 @@ module.exports = {
},
templates: function( props ) {
if( props.installer_mode === 'docker' ) {
return ['config.sh', path.join('docker', 'docker-compose.yaml')];
return ['config.sh','start.sh', 'stop.sh', path.join('docker', 'docker-compose.yaml')];
}
return ['config.sh'];
return ['config.sh','start.sh', 'stop.sh'];
}
};

View File

@@ -0,0 +1,11 @@
#!/bin/sh
<% if (docker_mode == 'swarm') { %>
export USER=$(id -u):$(id -g)
export ARCH=$(uname -m)
docker stack deploy -c docker-compose.yaml cyphernode
<% } else if(docker_mode == 'compose') { %>
export USER=$(id -u):$(id -g)
export ARCH=$(uname -m)
docker-compose -f docker-compose.yaml up -d
<% } %>

View File

@@ -0,0 +1,11 @@
#!/bin/sh
<% if (docker_mode == 'swarm') { %>
export USER=$(id -u):$(id -g)
export ARCH=$(uname -m)
docker stack rm cyphernode
<% } else if(docker_mode == 'compose') { %>
export USER=$(id -u):$(id -g)
export ARCH=$(uname -m)
docker-compose -f docker-compose.yaml down
<% } %>