Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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.buildAll(opts);
await compose.up(opts);
}
async setup() {
await dockerCompose.buildAll(options);
await dockerCompose.upAll(options);
await waitFor.start(30000);
}