creativecommons/wp-plugin-creativecommons

[Feature] Setup baseline docker-compose.yml file for easier development

possumbilities opened this issue · 0 comments

Problem

See #154

There are several steps required to begin developing this extension, such as

1. set up WordPress, a web server, and database locally
2. configure phpcs for WordPress coding standards
4. configure code standards in IDE

Each of these steps can prove to be problematic.

To scale back scope, we'll start by addressing item 1 and create a docker-compose.yml file at ./dev/ that can be called via docker compose -f ./dev/docker-compose.yml [command] in the commandline.

Description

MVP

At a minimum:

  • setup MySQL server (MariaDB preferably)
  • setup a web server (Apache), running latest WordPress files
  • make Web and DB server connect with each other appropriately
  • mount the db locally, so it persists
  • mount the WordPress install locally, so it persists
  • mount the wp-plugin-creativecommons plugin directory into the web server at wp-content/plugins/, so it can be user activated
  • include appropriate .gitignore additions so local mount points are not tracked ( ./dev/db & ./dev/wordpress)
  • update documentation to reflect new docker compose one-liner referencing docker-compose.yml file

Alternatives

  • I considered the full measure of what's included in #154 and while useful it's scope is much higher than is needed for a first round pass.
  • There is of course also MAMP, but it requires a bit too much manual setup and configuration to get going.

Additional context

Later Considerations

  • The aim will be mounting a local volume where the WordPress install will exist, so for this initial pass installing WordPress coding standards via Composer, configuring the IDE code standards, or anything specifically localized to VS Codespaces will be bumped and left up to the individual Developer to configure as required/desired.
  • Additionally, this setup will not install WordPress fully, developer action will be required to move through the in-browser UI. At a later time, WP CLI can be tied in to automate initial setup or provide further configuration options.
  • It might also be useful to include an install of Adminer for aide with GUI-based db manipulation.

Implementation

  • I would be interested in implementing this feature.