Exemple #1
0
    def create_cmfive_config_file(self, db_hostname):
        # add or override db_hostname config
        tokens = dict(self.config)
        tokens.update({"db_hostname": db_hostname})

        # render template into stage dir
        util.inflate_template(
            self.dirs.cmfive.joinpath("config.php.template"),
            self.dirs.stage,
            ".template",
            tokens,
            False
        )

        # copy file into container(s)
        for container in DockerCompose.containers_by_service(self.SERVICE_NAME):
            container.copy_file_into(
                source=self.dirs.stage.joinpath("config.php"),
                target="/var/www/html/config.php"
            )
Exemple #2
0
 def container_by_index(index):
     containers = list(DockerCompose.containers_by_service(WebService.SERVICE_NAME))
     return containers[index]
Exemple #3
0
 def run(self, command):
     """run command against web service container(s)"""
     for container in DockerCompose.containers_by_service(self.SERVICE_NAME):
         container.run_command(command)