-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
BuildService finding non-existent files to copy in Debian #662
Comments
This feel very weird. Could you provide a full ls/tree of the source media directory so I can reproduce? @clifmo Are you using |
Sure I saw this on a fresh install and my active install only has one PNG file and app CSS. I'll provide reproduction steps once I'm at my PC |
I have CI/CD working in my homelab via Gitea Actions, a private Docker registry, and Watchtower to pull in updates. So I build via Dockerfile and publish in my action. Was hoping this could work but Install Check
Docker Time
Build from host: macOS Sequoia 15.0.1
|
Thank you so much for the detailed reproduction steps! I'll get right on debugging this. |
It feels like I believe this issue is due to Debian having a different implementation for handling glob patterns. I tried a patch in 802ad4f, could you try to update your Docker environment to try out this branch in order to test if the fix works for you? You can run this command to try out the development branch: composer config repositories.framework vcs https://github.com/hydephp/framework && composer require "hyde/framework:dev-check-media-file-directories" --update-with-dependencies |
Well, I was working off my host, then copying into a docker environment during I still had the same issue with my Dockerfile. I did a few more steps to prove it. Dockerfile Commented the RUN build command.
Build
Run into built container
Check
Ensure dev framework
Build
Docker RunFresh container without copying from host. Host: Container:
|
@clifmo Does it seem like your issue was fixed by the patch/proper Docker setup? |
@caendesilva It does not, unfortunately. I really do appreciate the help. In short, this only happens when copying data from the host system into the container. I stuck a
|
@clifmo Thanks for providing all these information points. Sadly, I am personally not knowledgeable enough in Docker to fully understand what quirks are happening here, so I asked on Twitter to see if anyone else could take a look so we can get this fixed. In the meantime I will be working on switching to use the |
Have safe trips! I will possibly better learn Github Actions or hack something quick and dirty. Cheers |
Thank you! By the way, we do have a GitHub Action if you're looking to build (and deploy) your Hyde sites from a CI. https://github.com/hydephp/action Here is also a blog post if you want to make a more lower-level action using basic Action tooling. https://hydephp.com/posts/github-actions-deployment Let me know if you need any help! |
Yea! I saw that. As mentioned, I'm deploying to a homelab so my go-to method is monitoring Docker image updates with Watchtower. I'll have to figure out something to grab the artifact and stick it into the bind mount path. I suppose I can just |
@clifmo I got some answers on Twitter. Let me know if this could narrow it down for you.
Could you also confirm the following:
|
I provided reproduction steps based on a clean install so there are no additional files. I built the simplest docker image possible. It's in the reproduction steps. I figured out an actions-based approach which required a bit more than docs suggest, at least for my setup in Gitea. Happy to contribute that back. Sorry to be short, it's Monday. |
Thanks for the information. Just wanted to double check that everything in the reproduction steps were complete as I am not too familiar with Docker. I do have this Dockerfile which may be helpful, but I'm not 100% sure it works: FROM php:8.1-cli
# Install system dependencies
RUN apt update && apt install zip unzip
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Download base project files
RUN curl -L https://github.com/hydephp/hyde/archive/refs/heads/master.zip -o hyde.zip \
&& unzip hyde.zip \
&& rm hyde.zip \
&& mv hyde-master hyde
# Install Hyde
RUN cd /hyde && composer install
# Set the working directory
WORKDIR /hyde
# Make the HydeCLI executable
RUN chmod +x /hyde/hyde
# Set HydeCLI as the entrypoint
ENTRYPOINT ["/hyde/hyde"]
# Set the default command
CMD ["build"] There is also an experimental official Docker image for the standalone CLI project that you could maybe use: https://github.com/hydephp/cli/ |
Sounds good. I have moved on from this so there's no immediacy. However there still is something funky with the collection of media assets, and it's not glob. Although glob has its own issues. I will write up how I got actions working in a private network, Gitea, docker environment. Fair? |
That sounds great! Would love the read. I'll keep the issue open for a while, and work on moving away from glob, regardless of if it is relevant to this. Hope this doesn't discourage you from exploring HydePHP further. |
Absolutely not, you have been incredibly responsive. Next step is using the Laravel backend notifications to cross-post to socials. Has anyone you know worked on this? Staring with AT Protocol and ActivityPub |
Glad to hear it, thank you so much! I have actually not tried using notifications from Hyde, I love the idea and is something I'd also love to read a writeup on. I have not tried AT Protocol or ActivityPub but any Laravel notification driver should work. I think the build tasks feature would be great if you want to send notifications during the site build. https://hydephp.com/docs/1.x/build-tasks |
Definitely going to try. As promised, from idea to entirely self-hosted ci/CD in a weekend. https://blog.clifmo.com/posts/using-gitea-actions-to-deploy-hydephp-in-a-self-hosted-docker-environment.html |
Amazing writeup! And thanks for the shoutout ❤️ |
@clifmo This fix is now released and can be used by updating to HydePHP Framework v1.7.4. Happy holidays! |
I'm using Docker to build and I just sort of expected this to work. I've tried multiple version of PHP, different Debian releases. In short, BuildService tries to copy a file named
_media.css
which is the name of the folder, and not one of the file contents.I started using Alpine but PHP glob is a known issue. So it's interesting that this also relates to
glob()
. MediaFile.php:109I haven't had a chance to debug it but I'm curious why the directory is being considered as an asset, and what I can do to avoid this. Composer wants ^8.1 but I get a composer platform check error on 8.1. What am I missing?
The text was updated successfully, but these errors were encountered: