Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

./example-theme-src:/ usage is unclear in docs #5

Open
EarthmanWeb opened this issue Oct 1, 2020 · 1 comment
Open

./example-theme-src:/ usage is unclear in docs #5

EarthmanWeb opened this issue Oct 1, 2020 · 1 comment

Comments

@EarthmanWeb
Copy link

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!

@michaloo
Copy link
Owner

michaloo commented Oct 3, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants