1
0
mirror of https://github.com/yldio/copilot.git synced 2024-11-14 23:30:05 +02:00

build: pull fresh images before up-ing

This commit is contained in:
Sérgio Ramos 2017-06-01 00:32:12 +01:00
parent 5a3294b32c
commit 190230de2f

View File

@ -130,6 +130,7 @@ const deploy = async () => {
LOG(`${figures.arrowRight} deploy`); LOG(`${figures.arrowRight} deploy`);
// kill containers
await execa('docker-compose', ['kill'], { await execa('docker-compose', ['kill'], {
stdio: 'inherit', stdio: 'inherit',
env: Object.assign({}, env, { env: Object.assign({}, env, {
@ -137,6 +138,7 @@ const deploy = async () => {
}) })
}); });
// rm containers
await execa('docker-compose', ['rm'], { await execa('docker-compose', ['rm'], {
stdio: 'inherit', stdio: 'inherit',
env: Object.assign({}, env, { 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'], { return execa('docker-compose', ['up', '-d', '--build', '--force-recreate'], {
stdio: 'inherit', stdio: 'inherit',
env: Object.assign({}, env, { env: Object.assign({}, env, {