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

Request: just include WP-CLI or offer an image that has both #926

Closed
theDanielJLewis opened this issue Oct 23, 2024 · 4 comments
Closed

Comments

@theDanielJLewis
Copy link

I've been trying for hours to get wordpress:cli to work in the Docker environment that Coolify uses. It all comes down to something that seems to be marking the CLI image as unhealthy, causing it to reboot over and over. But in the brief moment before it reboots, it does have a connection to WordPress when the compose file is configured for shared environment variables, volumes, and dependencies. But it restarts nonetheless.

But it really shouldn't be this complicated. Why not simply include WP-CLI with the default WordPress image? Or offer a third image that includes both WordPress and the CLI? That would prevent this cumbersome setup just to get the CLI working. Plus, I think it makes more sense for the CLI and WordPress to actually be together.

@LaurentGoderre
Copy link
Member

If you are using compose with a cli image, the container would startup and the main process would have nothing to do and then would terminate and then create a restart loop.

If you want to have the CLI container stay up, you need to tell it to wait indefinitely using something like tail -f /dev/null as the command to keep it running

@theDanielJLewis
Copy link
Author

Funny, I figured out the "have nothing to do" part only about 30 minutes ago. But using tail is a brilliant way to keep it open!

Still, though, WP-CLI is such an indispensable tool for working with WordPress that I still think Docker should bundle it with the Docker official image.

(That is, of course, unless Matt goes nuclear against WP-CLI!)

Regardless, thanks for the tip, @LaurentGoderre! That gets me by for now, even though it's clunky.

You're the guy who "knew where to bang the hammer." 😎

@tianon
Copy link
Member

tianon commented Oct 24, 2024

Duplicate of #283

(see especially #283 (comment))

@tianon tianon closed this as completed Oct 24, 2024
@theDanielJLewis
Copy link
Author

My bad. I was certain I searched before posting, couldn't find that other issue.

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

3 participants