WIP: 5739-useDocker_inSalix #5

Closed
alexm wants to merge 4 commits from 5739-useDocker_inSalix into master
3 changed files with 1320 additions and 5 deletions

View File

@ -124,14 +124,14 @@ class Run extends Command {
try { try {
const server = new Server(ct, dbConfig); const server = new Server(ct, dbConfig);
const useCustom = opts.ci || opts.network
if (isRandom) { if (isRandom || useCustom) {
try { try {
const netSettings = await ct.inspect({ const netSettings = await ct.inspect({
format: '{{json .NetworkSettings}}' format: '{{json .NetworkSettings}}'
}); });
if (opts.ci || opts.network) { if (useCustom) {
dbConfig.host = opts.network dbConfig.host = opts.network
? netSettings.Networks[opts.network].IPAddress ? netSettings.Networks[opts.network].IPAddress
: netSettings.Gateway; : netSettings.Gateway;

3
myt.js
View File

@ -181,7 +181,7 @@ class Myt {
const defaultConfig = require(`${__dirname}/assets/myt.default.yml`); const defaultConfig = require(`${__dirname}/assets/myt.default.yml`);
const config = Object.assign({}, defaultConfig); const config = Object.assign({}, defaultConfig);
const configFile = 'myt.config.yml'; const configFile = opts.configFile ?? 'myt.config.yml';
const configPath = path.join(opts.workspace, configFile); const configPath = path.join(opts.workspace, configFile);
if (await fs.pathExists(configPath)) { if (await fs.pathExists(configPath)) {
@ -407,7 +407,6 @@ class Myt {
async openRepo() { async openRepo() {
const {opts} = this; const {opts} = this;
if (!await fs.pathExists(`${opts.workspace}/.git`)) if (!await fs.pathExists(`${opts.workspace}/.git`))
throw new Error ('Git not initialized'); throw new Error ('Git not initialized');

1316
pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load Diff