How to use the docker-compose.yml 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 rancher / ui / app / components / new-catalog / component.js View on Github external
willSave() {
    this.set('errors', null);
    var ok = this.validate();
    if (!ok) {
      // Validation failed
      return false;
    }

    var files = this.get('selectedTemplateModel.files');

    this.get('environmentResource').setProperties({
      dockerCompose: files['docker-compose.yml'],
      rancherCompose: files['rancher-compose.yml'],
      environment: this.get('answers'),
      externalId: this.get('newExternalId'),
    });

    return true;
  },
github LeanKit-Labs / cowpoke / src / rancher.js View on Github external
const upgradeStack = Promise.coroutine( function *( http, stack, template ) {
	const idParts = stack.externalId.split( "//" );
	const versionInfo = idParts[ 1 ].split( ":" );
	let newStack = yield http.post( stack.actions.upgrade, {
		externalId: `${idParts[ 0 ]}//${versionInfo[ 0 ]}:${ versionInfo[ 1 ] }:${ template.version}`,
		dockerCompose: template[ "docker-compose.yml" ],
		rancherCompose: template[ "rancher-compose.yml" ],
		environment: stack.environment
	} );
	while ( newStack.state !== "upgraded" ) {
		yield Promise.delay( 500 );
		newStack = yield http.get( stack.links.self, {} );
	}
	newStack = yield http.post( newStack.actions.finishupgrade, {} );

	return newStack;
} );
github LeanKit-Labs / cowpoke / spec / behavior / rancher.spec.js View on Github external
"docker-compose.yml": "dockerCompose",
	"rancher-compose.yml": "rancherCompose"
};

const newStack = Object.assign( {}, stacksBody[ 0 ] );
newStack.rancherCompose = upgradeTemplate[ "rancher-compose.yml" ];
newStack.dockerCompose = upgradeTemplate[ "docker-compose.yml" ];
newStack.state = "upgraded";
newStack.actions.finishupgrade = "/finishMe";

const upgradedStack = Object.assign( {}, newStack );
upgradedStack.state = "active";

const properUpgradeRequest = {
	externalId: `catalog://leankit:drone:${upgradeTemplate.version}`,
	dockerCompose: upgradeTemplate[ "docker-compose.yml" ],
	rancherCompose: upgradeTemplate[ "rancher-compose.yml" ],
	environment: stacksBody[ 0 ].environment
};

const resquestMoch = ( options, callback ) => {
	let mock;

	if ( options.url === "http://myrancher.com/v1/projects/l0l/environments/2a2/?action=upgrade" &&
	_.isEqual( options.body, properUpgradeRequest ) ) {
		mock = { auth: () => callback( null, { body: newStack } ) };
	} else if ( options.url === "http://myrancher.com/finishMe" ) {
		mock = { auth: () => callback( null, { body: upgradedStack } ) };
	} else {
		mock = { auth: () => callback( "err" ) };
	}
github LeanKit-Labs / cowpoke / spec / behavior / rancher.spec.js View on Github external
name: "drone",
	state: "active",
	dockerCompose: "",
	externalId: "catalog://leankit:drone:1",
	kind: "environment",
	rancherCompose: ""
} ];
const upgradeTemplate = {
	version: "2",
	"docker-compose.yml": "dockerCompose",
	"rancher-compose.yml": "rancherCompose"
};

const newStack = Object.assign( {}, stacksBody[ 0 ] );
newStack.rancherCompose = upgradeTemplate[ "rancher-compose.yml" ];
newStack.dockerCompose = upgradeTemplate[ "docker-compose.yml" ];
newStack.state = "upgraded";
newStack.actions.finishupgrade = "/finishMe";

const upgradedStack = Object.assign( {}, newStack );
upgradedStack.state = "active";

const properUpgradeRequest = {
	externalId: `catalog://leankit:drone:${upgradeTemplate.version}`,
	dockerCompose: upgradeTemplate[ "docker-compose.yml" ],
	rancherCompose: upgradeTemplate[ "rancher-compose.yml" ],
	environment: stacksBody[ 0 ].environment
};

const resquestMoch = ( options, callback ) => {
	let mock;