Skip to content

Commit 7183162

Browse files
committed
Add custom docker-compose support
1 parent eb259aa commit 7183162

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/Admin_Tools_Command.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use EE\Model\Site;
1010
use Symfony\Component\Filesystem\Filesystem;
1111
use function EE\Site\Utils\auto_site_name;
12+
use function EE\Utils\docker_compose_with_custom;
1213
use function EE\Utils\download;
1314
use function EE\Utils\extract_zip;
1415
use function EE\Utils\random_password;
@@ -114,7 +115,7 @@ public function enable( $args, $assoc_args ) {
114115

115116
chdir( $this->site_data->site_fs_path );
116117

117-
$launch = EE::launch( 'docker-compose config --services' );
118+
$launch = EE::launch( docker_compose_with_custom() . ' config --services' );
118119
$services = explode( PHP_EOL, trim( $launch->stdout ) );
119120
$min_req_services = [ 'nginx', 'php' ];
120121

@@ -135,7 +136,7 @@ public function enable( $args, $assoc_args ) {
135136
$docker_compose_admin = EE\Utils\mustache_render( ADMIN_TEMPLATE_ROOT . '/docker-compose-admin.mustache', $docker_compose_data );
136137
$this->fs->dumpFile( $this->site_data->site_fs_path . '/docker-compose-admin.yml', $docker_compose_admin );
137138

138-
if ( EE::exec( 'docker-compose -f docker-compose.yml -f docker-compose-admin.yml up -d nginx' ) ) {
139+
if ( EE::exec( docker_compose_with_custom( ['docker-compose-admin.yml'] ) . ' up -d nginx' ) ) {
139140
EE::success( sprintf( 'admin-tools enabled for %s site.', $this->site_data->site_url ) );
140141
$this->site_data->admin_tools = 1;
141142
$this->site_data->save();

0 commit comments

Comments
 (0)