Skip to content

Commit 2dbdadb

Browse files
dati18tarrow
andauthored
Fix generated URLs to include :8001 in docker compose dev env (#519)
* Fix generated URLs to include :8001 in docker compose dev env Bug: T414813 * Pass localhost port as a variable * Add 'MW_LOCAL_HOST_PORT' variable * Update dist-persist/wbstack/src/Settings/LocalSettings.php Co-authored-by: Thomas Arrow <tarrow@users.noreply.github.com> * sync with dist --------- Co-authored-by: Thomas Arrow <tarrow@users.noreply.github.com>
1 parent 9853d30 commit 2dbdadb

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

dist-persist/wbstack/src/Settings/LocalSettings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
}
9696

9797
if ( $wwDockerCompose ) {
98-
$wgServer = "http://" . $wikiInfo->domain;
98+
$wgServer = "http://" . $wikiInfo->domain . ":" . getenv('MW_LOCAL_HOST_PORT');
9999
} else {
100100
$wgServer = "https://" . $wikiInfo->domain;
101101
}

dist/wbstack/src/Settings/LocalSettings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@
9595
}
9696

9797
if ( $wwDockerCompose ) {
98-
$wgServer = "http://" . $wikiInfo->domain;
98+
$wgServer = "http://" . $wikiInfo->domain . ":" . getenv('MW_LOCAL_HOST_PORT');
9999
} else {
100100
$wgServer = "https://" . $wikiInfo->domain;
101101
}

docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ services:
3939
- MW_REDIS_CACHE_SERVER_WRITE=redis.svc
4040
- MW_REDIS_PASSWORD=
4141

42+
- MW_LOCAL_HOST_PORT=8001
43+
4244
volumes:
4345
- "./dist:/var/www/html/w:cached"
4446
- ./docker-compose/php.ini:/usr/local/etc/php/php.ini

0 commit comments

Comments
 (0)