humanmade / altis-local-server

Local Server module for Altis
https://www.altis-dxp.com/resources/docs/local-server/
17 stars 4 forks source link

Add option to override default site path #745

Open rmccue opened 1 month ago

rmccue commented 1 month ago

For sites where the default site isn't the root of the local URL, it'd be useful to have a way to override the default that we provide to wp-cli. e.g. if your default site is at example.altis.dev/en/, you currently need to pass the URL every time.

I'd suggest we add a default_site_url option (e.g. "default_site_url": "https://example.altis.dev/en/"), or a default_site_path option (e.g. "default_site_path": "/en/") to override this.


Acceptance Criteria


For Altis Team Use

Ready for Work Checklist

Is this ticket ready to be worked on? See the Play Book Definition of Ready.

Completion Checklist

Is this ticket done? See the Play Book Definition of Done.

rmccue commented 1 month ago

This looks like the main place we generate the URL:

https://github.com/humanmade/altis-local-server/blob/3b492e9b29e24a90af00ec603039ad6ae0b088f5/inc/composer/class-command.php#L1143-L1160

However, this is also used in the Docker compose generator for the Tachyon URL, so overriding this would break Tachyon URLs (e.g. would be https://example.altis.dev/en/tachyon/ which would break), so needs something slightly different. Possibly the Docker compose should be updated to use the hostname instead of the URL, but needs checking with the Codespaces support too.

ferschubert-hm commented 1 month ago

Hey team! Please add your planning poker estimate with Zenhub @jerico @kovshenin @mikelittle @wisyhambolu

ferschubert-hm commented 3 hours ago

Please add your planning poker estimate with Zenhub @filter182