From 190230de2f92ecf0bedef6660e34f6e5e169c53b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81rgio=20Ramos?= Date: Thu, 1 Jun 2017 00:32:12 +0100 Subject: [PATCH] build: pull fresh images before up-ing --- scripts/deploy | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/deploy b/scripts/deploy index 37ea9bf1..7880e2e6 100755 --- a/scripts/deploy +++ b/scripts/deploy @@ -130,6 +130,7 @@ const deploy = async () => { LOG(`${figures.arrowRight} deploy`); + // kill containers await execa('docker-compose', ['kill'], { stdio: 'inherit', env: Object.assign({}, env, { @@ -137,6 +138,7 @@ const deploy = async () => { }) }); + // rm containers await execa('docker-compose', ['rm'], { stdio: 'inherit', env: Object.assign({}, env, { @@ -144,6 +146,15 @@ const deploy = async () => { }) }); + // pull new images + await execa('docker-compose', ['pull'], { + stdio: 'inherit', + env: Object.assign({}, env, { + COMPOSE_PROJECT_NAME + }) + }); + + // up project return execa('docker-compose', ['up', '-d', '--build', '--force-recreate'], { stdio: 'inherit', env: Object.assign({}, env, {