Skip to content

added optional entrypoint directory #124

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

Closed
wants to merge 0 commits into from

Conversation

vutran
Copy link

@vutran vutran commented Jan 21, 2016

This will add the ability to add additional scripts to be processed (which should be stored in /docker-entrypoint-initwordpress.d/) similar to docker-library/mysql

@yosifkit
Copy link
Member

A few questions/comments:

  • what is the use case?
  • is this the optimal spot to run hooks? should it be after database creation? before modifying wp-config.php? Some users might argue that those other places would be better for hooking in scripts.
  • what does this add that couldn't be accomplished with a docker run -d -v /path/to/my-script.sh:/usr/local/bin/apache2-special.sh ... wordpress "apache2-special.sh" (if my script just ends with exec apache2-foreground)?
  • the reason for similar directories/hooks in the mysql, postres, mariadb, and percona images is that those are things that need to be run with the database running and so it could not be chained like suggested above.

@vutran
Copy link
Author

vutran commented Jan 23, 2016

I can see some use cases for this added functionality:

  • cloning a repo with a theme/plugin, and activating it automatically
  • running any necessary app-specific tests
  • app requirements such as installing composer packages, or compiling assets with node
  • pulling uploadable assets from a remote location (wp-content/uploads, etc.)

You're right, we should probably move the script after the database creation should there be any use-case it requires modifications to the db such as changing the home, and siteurl in the wp_options table for different environments such as local, staging, production.

It will enable users to use Docker Compose to bootstrap easily and run any necessary scripts without overriding the default entrypoint

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

Successfully merging this pull request may close these issues.

2 participants