There is a docker-compose file in the root directory that allows for serving multiple development sites locally.
These are currently not using the real api but rather gets their settings from the static json files included in the data folder.
The fake api is served by the server.php script and reads the corresponding subdomain from each request.
docker compose up --buildNote
It's important to include the --build flag after making any significant changes to dist. The Dockerfile contains important maintenance scripts (e.g., rebuildLocalisationCache.php) that will only run when the container image is rebuilt.
Wait until both sites are accessible:
You may need to add an entry to your hosts file:
127.0.0.1 site1.localhost site2.localhost
Once the sites are accessible you can perform secondary setup (The request takes a while to execute):
curl -l -X POST "http://site1.localhost:8001/w/api.php?action=wbstackElasticSearchInit&format=json"
curl -l -X POST "http://site2.localhost:8001/w/api.php?action=wbstackElasticSearchInit&format=json"Removing the installation:
docker compose down --volumesGeneral overview of the cluster
http://localhost:9200/_stats
Entries in the content index (Items, Lexemes) for site1.localhost can be found by going to the following url
http://localhost:9200/site1.localhost_content_first/_search