Is there a complete guide from A to Z how to setup this repo INCLUDING details like setting up the users node and www-data?
I've been trying my best to read through the issues on here to figure out a way to deploy this starterkit, but there's a lot of things missing that I don't know exaclty how to fix.
wp-headless | Waiting for MySQL..
wp-headless | Error: This does not seem to be a WordPress installation.
wp-headless | Pass --path=path/to/wordpressor runwp core download.
wp-headless | Error: '/var/www/html/' is not writable by current user.
I've been working on fixing this specific issue, manually having to add in the node user (for some reason it did not exist at all). To my surprise the /var/www/html directory didn't even exist when I fired up my ubuntu with linux subsystem. But regardless of any fixes I tried to use from any of the other issues on here, none of them have worked.
To summarize what I've done:
- I activated hypervisor and WSL 2.
- Downloaded and successfully fired up a terminal window instance of ubuntu after installing it from the microsoft app store.
- Downloaded and installed the docker desktop setup fully on my windows machine.
4a. I've installed node, wordpress, mysql, and all the relevant extensions. I've also made sure to activate WSL integration into my ubuntu terminal.
4b. I downloaded the repo onto my
~directory and have literally not touched anything at all, everything remains exactly the same way as it was installed. - I have used the
docker-compose up --build --force-recreate wp-headlesscommand both without and with sudo. - I have added the node user, given him privileges to see into the frontend/node_modules directory as per instructions from a previous issue here.
- I manually created the
/www/htmlsubdirectories in the/vardirectory (as those subdirectories did not exist by default for some reason). - I even copied the wordpress folder from the repo into the now created /var/www/html directory in hopes that it would recognize it.
So far I've tried everything, that I could possibly find as being a reasonable solution to this - but it still has not fixed the issue. Any help would be appreciated, thanks.
After wasting a few hours I managed to fix the Error: '/var/www/html/' is not writable by current user..
It turns out it had nothing to do with the container itself nor the user, but the cloned files in my server.
When you clone this repo in your server the wordpress folder lacks permissions, so I had to change its permissions:
chmod -R 777 <clone_repo_root>/wordpress
then do docker compose --progress plain up --build --force-recreate wp-headless