dockerpresso
dockerpresso copied to clipboard
./example-theme-src:/ usage is unclear in docs
It isn't clear in the documentation what to put in here:
./example-theme-src:/var/www/html/wp-content/themes/example-theme
Can you please clarify what the purpose of this line is in the build process, and how it should be customized?
Thanks in advance!
Hey @EarthmanWeb!
Thanks for your question.
This line is applicable if dockerpresso is used for theme development. ./example-theme-src should be a directory where style.css is present.
Let's consider following project structure (the root directory and theme name is theme-foo):
theme-foo/
src/
style.cs
header.php
...other theme files
.env
docker-compose.yml
docker-compose.admin.yml
Dockerpressofile
In such example this line should be changed to following:
./src:/var/www/html/wp-content/themes/theme-foo
As a result in your wordpress directory inside docker container /var/www/html/wp-content/themes/theme-foo will contain style.css (key file for Wordpress to understand this is theme) and other theme files. Stuff outside src won't be mounted and visible to Wordpress (good place to put some docs, build scripts etc.).
Alternatively if you want to keep everything at the project root the line from docker-compose.yml should be following:
.:/var/www/html/wp-content/themes/theme-foo
But frankly speaking this feels wrong to me as it will mount all dockerpresso related files to Wordpress so I didn't test it.
I hope that helps, let me know. I will try to include more examples and details in the docs.