How to use the docker-compose.upMany 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 WordPress / gutenberg / packages / env / lib / env.js View on Github external
);
		} catch ( err ) {
			// Some commit refs need to be set as detached.
			await repo.setHeadDetached( ref );
		}
		spinner.text = `Downloading WordPress@${ ref } 100/100%.`;

		spinner.text = `Starting WordPress@${ ref }.`;
		fs.writeFileSync(
			dockerComposeOptions.config,
			createDockerComposeConfig( cwd, cwdName, cwdTestsPath, context )
		);

		// These will bring up the database container,
		// because it's a dependency.
		await dockerCompose.upMany(
			[ 'wordpress', 'tests-wordpress' ],
			dockerComposeOptions
		);

		const retryableSiteSetup = async () => {
			try {
				await Promise.all( [ setupSite(), setupSite( true ) ] );
			} catch ( err ) {
				await wait( 5000 );
				throw err;
			}
		};
		// Try a few times, in case
		// the database wasn't ready.
		await retryableSiteSetup()
			.catch( retryableSiteSetup )