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

docker compose alpha watch fails to sync files if the destination directory does not exist #10862

Closed
kevinlinxc opened this issue Aug 2, 2023 · 4 comments
Assignees
Labels

Comments

@kevinlinxc
Copy link

Description

I am using the experimental watch feature to run Hugo, a website builder in Docker Compose. When I modify a file locally, it gets copied into the docker container, the served website at localhost:1313 gets updated, great. However, if I make a new folder (which is one way of making content on Hugo), this does not sync with the container, meaning any new files I put in there cause the whole thing to error out. Is there an option to sync folders too, and if not, can it be added?

@kevinlinxc
Copy link
Author

kevinlinxc commented Aug 2, 2023

Apologies, I'm mistaken, I must have just not had the watch running when I made the folder, but then it was running when I made the file in the folder. Perhaps a suggestion would be to recursively make folders as necessary if a file change is detected then?

@milas
Copy link
Contributor

milas commented Aug 2, 2023

You're correct - right now syncing files to a path that doesn't fully exist in the container will fail currently.

There are some improvements coming to sync (#10853) which will address this as well as several other edge cases. I'll update this issue with the Compose version once released.

@milas milas added the kind/bug label Aug 2, 2023
@milas milas changed the title docker compose alpha watch should have an option to watch folders too docker compose alpha watch fails to sync files if the destination directory does not exist Aug 2, 2023
@milas
Copy link
Contributor

milas commented Aug 11, 2023

Give this a try with v2.20.3, which was just released! There's various watch improvements including a fix for this.

@milas milas closed this as completed Aug 11, 2023
@kevinlinxc
Copy link
Author

I'll take your word for it! Thank you!

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

No branches or pull requests

2 participants