You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These need to be made consistent; this probably should have been done in #341 and #465, but we missed it. (You can verify this by running env inside composer server shell)
We also need to fix the HTTP_HOST override, as if we're in Codespaces, the TLD is not set at all. COMPOSE_PROJECT_NAME seems to only be used in this code, so it should be fine to update this.
Steps to reproduce:
composer server shell
wp
Error: Site 'your-project.altis.dev.' not found. Define DOMAIN_CURRENT_SITE in 'wp-config.php' or use
--url=to override.
This occurs because we set the host name using
COMPOSE_PROJECT_NAME
andCOMPOSE_PROJECT_TLD
:altis-local-server/inc/namespace.php
Lines 40 to 42 in cdf079c
However, the latter is not defined, so we get a trailing
.
Worse,
COMPOSE_PROJECT_NAME
is inconsistent; usually, it refers only to the subdomain:altis-local-server/inc/composer/class-command.php
Lines 203 to 204 in cdf079c
However, the docker-compose configuration instead sets this to the full domain:
altis-local-server/inc/composer/class-docker-compose-generator.php
Line 169 in cdf079c
These need to be made consistent; this probably should have been done in #341 and #465, but we missed it. (You can verify this by running
env
insidecomposer server shell
)We also need to fix the
HTTP_HOST
override, as if we're in Codespaces, the TLD is not set at all.COMPOSE_PROJECT_NAME
seems to only be used in this code, so it should be fine to update this.I would suggest we introduce a new environment variable instead of reusing this, since
COMPOSE_PROJECT_NAME
has an existing specific purpose.Acceptance criteria:
COMPOSE_PROJECT_NAME
contains only the docker-compose project nameCOMPOSE_PROJECT_TLD
contains the TLD inside the shellALTIS_DEFAULT_HOST
contains the defaultHTTP_HOST
wp
with no--url
parameter inside the shell usesALTIS_DEFAULT_HOST
correctlyThe text was updated successfully, but these errors were encountered: