How to use the docker-compose.down function in docker-compose

To help you get started, we’ve selected a few docker-compose examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Soluto / oidc-server-mock / e2e / utils / backend-test-runner.js View on Github external
async teardown() {
    // await dockerCompose.logs(['oidc-server-mock'], options);
    await dockerCompose.down(options);
    await waitFor.stop(30000);
  }
github jsdevkr / gitCodeShare.com / docker / dev_stop.ts View on Github external
const path = require('path');
  const compose = require('docker-compose');
  // const dockerode = require('dockerode');

  const kill = require('kill-port');
  await kill(parseInt(process.env.FRONT_PORT, 10) || 3000);
  await kill(parseInt(process.env.BACKEND_PORT, 10) || 3030);

  // const prod = process.env.NODE_ENV === 'production';
  const opts = {
    cwd: path.join(__dirname),
    log: true,
    config: 'docker-compose-dev.yml',
  };

  await compose.down(opts);
}