ci: stop containers before pulling

This commit is contained in:
Sérgio Ramos 2017-06-20 17:41:58 +01:00
parent 30d369f194
commit 8a4a40f7f4

View File

@ -134,6 +134,14 @@ const deploy = async () => {
LOG(`${figures.arrowRight} deploy`); LOG(`${figures.arrowRight} deploy`);
// stop containers
await execa('docker-compose', ['stop'], {
stdio: 'inherit',
env: Object.assign({}, env, {
COMPOSE_PROJECT_NAME
})
});
// kill containers // kill containers
await execa('docker-compose', ['kill'], { await execa('docker-compose', ['kill'], {
stdio: 'inherit', stdio: 'inherit',
@ -143,7 +151,7 @@ const deploy = async () => {
}); });
// rm containers // rm containers
await execa('docker-compose', ['rm', '--force'], { await execa('docker-compose', ['rm', '-f', '-v'], {
stdio: 'inherit', stdio: 'inherit',
env: Object.assign({}, env, { env: Object.assign({}, env, {
COMPOSE_PROJECT_NAME COMPOSE_PROJECT_NAME