@Override
    protected void run(final Bootstrap<Config> bootstrap,
                       final Namespace namespace,
                       final Config config) throws Exception {

        LOGGER.info("Using application configuration file {}",
                configFile.toAbsolutePath().normalize());

        try {
            LOGGER.debug("Creating bootstrap injector");
            final Injector bootstrapInjector = BootstrapUtil.bootstrapApplication(
                    config, configFile);

            LOGGER.debug("Creating app injector");
            final Injector appInjector = bootstrapInjector.createChildInjector(
                    new AppModule());

            // Force guice to get all datasource instances from the multibinder
            // so the migration will be run for each stroom module
            // Relies on all db modules adding an entry to the multibinder
            appInjector.getInstance(Key.get(GuiceUtil.setOf(DataSource.class)));

            LOGGER.info("DB migration complete");

            final SecurityContext securityContext = appInjector.getInstance(SecurityContext.class);

            securityContext.asProcessingUser(() -> {
                info(LOGGER, "Running command " + commandName + " with arguments: " + argsToString(namespace));

                try {
                    runCommand(bootstrap, namespace, config, appInjector);
                } catch (Exception e) {
                    final String msg = "Error running command "
                            + commandName
                            + ": " + e.getMessage()
                            + ". Check logs for more detail.";
                    System.err.println(msg);
                    LOGGER.error(msg, e);
                    System.exit(1);
                }

                info(LOGGER, "Command " + commandName + " completed successfully");
                System.exit(0);
            });
        } catch (Exception e) {
            final String msg = "Error initialising application";
            LOGGER.error(msg, e);
            System.err.println(msg);
            System.exit(1);
        }
    }
Additional DW Command so instead of
... server ../local.yml
you can do
... migrate ../local.yml
and it will run all the DB migrations without running up the app
stroom-app/src/main/java/stroom/app/commands/AbstractStroomAccountConfiguredCommand.java