diff --git a/inc/composer/class-command.php b/inc/composer/class-command.php index 4b8b1346..2ce01bda 100644 --- a/inc/composer/class-command.php +++ b/inc/composer/class-command.php @@ -201,7 +201,6 @@ protected function get_env() : array { return [ 'VOLUME' => getcwd(), 'COMPOSE_PROJECT_NAME' => $this->get_project_subdomain(), - 'COMPOSE_PROJECT_TLD' => $this->get_project_tld(), 'DOCKER_CLIENT_TIMEOUT' => 120, 'COMPOSE_HTTP_TIMEOUT' => 120, 'PATH' => getenv( 'PATH' ), @@ -474,18 +473,6 @@ protected function exec( InputInterface $input, OutputInterface $output, ?string $site_url = $this->get_project_url(); $options = $input->getArgument( 'options' ); - $passed_url = false; - foreach ( $options as $option ) { - if ( strpos( $option, '--url=' ) === 0 ) { - $passed_url = true; - break; - } - } - - if ( ! $passed_url && $program === 'wp' ) { - $options[] = '--url=' . $site_url; - } - // Escape all options. Because the shell is going to strip the // initial escaping like "My string" => My String, then we need // to reapply escaping. diff --git a/inc/composer/class-docker-compose-generator.php b/inc/composer/class-docker-compose-generator.php index 58def309..b8357ffd 100644 --- a/inc/composer/class-docker-compose-generator.php +++ b/inc/composer/class-docker-compose-generator.php @@ -166,7 +166,8 @@ protected function get_php_reusable() : array { ], 'environment' => [ 'HOST_PATH' => $this->root_dir, - 'COMPOSE_PROJECT_NAME' => $this->hostname, + 'COMPOSE_PROJECT_NAME' => $this->project_name, + 'ALTIS_DEFAULT_HOST' => $this->hostname, 'DB_HOST' => 'db', 'DB_READ_REPLICA_HOST' => 'db-read-replica', 'DB_PASSWORD' => 'wordpress', diff --git a/inc/namespace.php b/inc/namespace.php index c04eeb7b..bee4b42b 100644 --- a/inc/namespace.php +++ b/inc/namespace.php @@ -38,7 +38,7 @@ function bootstrap() { } if ( empty( $_SERVER['HTTP_HOST'] ) ) { - $_SERVER['HTTP_HOST'] = getenv( 'COMPOSE_PROJECT_NAME' ) . '.' . getenv( 'COMPOSE_PROJECT_TLD' ); + $_SERVER['HTTP_HOST'] = getenv( 'ALTIS_DEFAULT_HOST' ); } defined( 'DB_HOST' ) or define( 'DB_HOST', getenv( 'DB_HOST' ) );