Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (get('proxy.ssl.cert') && get('proxy.ssl.key')) {
const httpsPort = get('proxy.httpsPort', 443);
ports.push(`${httpsPort}:${httpsPort}`);
}
finalDockerCompose['devctl-proxy'] = {
image: 'splitmedialabs/devctl-proxy:latest',
restart: 'always',
ports,
environment,
};
}
// write the final docker-compose to a file in the cwd
await filesystem.write(get('paths.compose'), YAML.dump(finalDockerCompose));
// next step!
return require('../cli').run('up');
},
};
let finalDotEnv = {};
const exists = await filesystem.exists(dotenvPath);
if (exists) {
const raw = await filesystem.read(dotenvPath);
finalDotEnv = parseEnv(raw);
}
finalDotEnv = {
...finalDotEnv,
...dotenv,
};
await filesystem.write(dotenvPath, stringifyToEnv(finalDotEnv));
});
async function saveCurrentConfig(path, config) {
return filesystem.write(path, YAML.dump(config));
}
async function writeComposeFileToHomeDir(compose) {
return filesystem.write(lastDCPath, compose);
}