EqualifyEverything / equalify

A web accessibility platform, managing issues by integrating with A11Y services.
https://equalify.app
Other
118 stars 21 forks source link

Add Docker Container #40

Closed bbertucc closed 1 year ago

bbertucc commented 2 years ago

As #38 demonstrates, we may need to create a docker container so that users can quickly spin up and test their own distribution.

bbertucc commented 2 years ago

I have avoided docker since initializing a Docker container can become a burden for folks without development experience. My goal was to create something as easy as WordPress' famous WordPress install. That said, maybe Docker is getting easier?

I would be happy to build or incorporate a pull request for this if people showed interest.

kreynen commented 2 years ago

I quickly spun this up within DDEV by simply accepting the defaults for a PHP project.

$ git clone git@github.com:bbertucc/equalify.git
$ cd equalify
$ ddev config
$ Project name (equalify): 
$ Docroot Location (current directory):
$ Project Type [backdrop, drupal10, drupal6, drupal7, drupal8, drupal9, laravel, magento, magento2, php, shopware6, typo3, wordpress] (PHP): 
$ ddev status

Update the config.php file with the InDocker values in the db row. It will be something like ddev-equalify-db:3306 which translates to $GLOBALS['DB_HOST'] = 'ddev-equalify-db'; and $GLOBALS['DB_PORT'] = '3306'; Then I just configured the WAVE Key (after figuring out https://github.com/bbertucc/equalify/issues/85) and run...

$ ddev start

There are many benefits of DDEV over straight Docker, but a few key benefits are that 1) the DDEV install process for all major operating systems is well supported so you aren't trying to explain/support that and 2) DDEV is already supports many of the same PHP CMS projects you are building integrations for

kreynen commented 2 years ago

I skipped a few steps. Accepting the defaults for a PHP project is correct...

git clone git@github.com:bbertucc/equalify.git
$ cd equalify
$ ddev config
$ Project name (equalify): 
$ Docroot Location (current directory):
$ Project Type [backdrop, drupal10, drupal6, drupal7, drupal8, drupal9, laravel, magento, magento2, php, shopware6, typo3, wordpress] (PHP): 

but you need to actually ddev start before you can get the db values from ddev status. Once started, you need to CREATE DATABASE equalify; on the MariaDB instance ddev creates.

$ ddev mysql -uroot -proot
MariaDB [db]> CREATE DATABASE equalify;
MariaDB [db]> exit

You can also create this database using PHPMyAdmin or one of the client-side SQL GUI's DDEV supports.

While the current version of DDEV defaults to PHP8.0 and the Equalify installer will run, Equalify recommends PHP8.1 so in the .ddev/config.yml, update php_version: "8.0" to php_version: "8.1" and ddev restart.

Then when you visit your site at https://equalify.ddev.site, the installer should just run.

bbertucc commented 1 year ago

Closing this issue, since anyone who wants to spinup a docker container can use @kreynen's solution.

bbertucc commented 1 year ago

With MVP-4, our sample-config.php now includes variables that work with ddev by default. That includes DB_SOCKET, PHP_PATH, and DB_HOST info that come standard with `ddev. Thanks to @kreynen for the awesome directions!