simple docker and integration
Closed this issue · 10 comments
- simple Docker to build Drupal site and install Tripal
- Hook up to CI to test builds
so we do already have a docker file. https://github.com/tripal/t4d8/tree/8.x-4.x/tripaldocker
I'll run it and see how it works. I do think its a bit intimidating, I wonder if instead we had our dockerfile start at Drupal 8's official image we could tone down how custom it is?
I think that's a great idea! Also less for us to maintain :-)
I know you've been busy lately @bradfordcondon but can you update us on any progress so that someone else could help with this during the Hackathon at PAG?
nope no progress since my last message. I do think if we can run it off the official d8 it will greatly simplify the docker build script to make it easier for people to work with/understand. I'm just not sure at what cost.
I'll try to get a docker compose file built for this starting from Drupal 8 official image.
PR from @almasaeed2010 merged. We now have a working docker instance 👍
From the PR:
This adds a new docker-compose.yml file to allow for easy docker setup. Because this integration utilizes publicly available images, there is nothing for us to maintain as it will automatically pull new images when released. This implementation provides support for Drupal 8, Postgres 10 and Drush 8 and can be easily expanded to offer other services such as ElasticSearch or Solr.
I have not removed any of the old docker files in tripaldocker since I wasn't sure what's still needed or if more complex implementation for advanced users is preferred.
Usage is documented in the README
I have Travis CI working in branch 8.x-4.x
. It's using the base Travis environment, Postgresql 10, php 7.2 and Drupal 8.8.x-dev. The site is installing properly and the module enables. However, tests are still failing:
GuzzleHttp\Exception\ConnectException: cURL error 7: Failed to connect to 127.0.0.1 port 8080: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)
/home/travis/build/tripal/t4d8/tripal4/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:200
/home/travis/build/tripal/t4d8/tripal4/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:155
/home/travis/build/tripal/t4d8/tripal4/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:105
/home/travis/build/tripal/t4d8/tripal4/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php:43
/home/travis/build/tripal/t4d8/tripal4/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php:28
/home/travis/build/tripal/t4d8/tripal4/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php:51
/home/travis/build/tripal/t4d8/tripal4/web/core/tests/Drupal/Tests/BrowserTestBase.php:345
/home/travis/build/tripal/t4d8/tripal4/web/core/lib/Drupal/Core/Test/HttpClientMiddleware/TestHttpClientMiddleware.php:31
/home/travis/build/tripal/t4d8/tripal4/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php:37
/home/travis/build/tripal/t4d8/tripal4/vendor/guzzlehttp/guzzle/src/Middleware.php:35
/home/travis/build/tripal/t4d8/tripal4/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php:54
/home/travis/build/tripal/t4d8/tripal4/vendor/guzzlehttp/guzzle/src/Middleware.php:59
/home/travis/build/tripal/t4d8/tripal4/vendor/guzzlehttp/guzzle/src/HandlerStack.php:71
/home/travis/build/tripal/t4d8/tripal4/vendor/guzzlehttp/guzzle/src/Client.php:361
/home/travis/build/tripal/t4d8/tripal4/vendor/guzzlehttp/guzzle/src/Client.php:163
/home/travis/build/tripal/t4d8/tripal4/vendor/guzzlehttp/guzzle/src/Client.php:183
/home/travis/build/tripal/t4d8/tripal4/vendor/fabpot/goutte/Goutte/Client.php:180
/home/travis/build/tripal/t4d8/tripal4/vendor/symfony/browser-kit/Client.php:318
/home/travis/build/tripal/t4d8/tripal4/vendor/behat/mink-browserkit-driver/src/BrowserKitDriver.php:144
/home/travis/build/tripal/t4d8/tripal4/vendor/behat/mink/src/Session.php:148
/home/travis/build/tripal/t4d8/tripal4/web/core/tests/Drupal/Tests/BrowserTestBase.php:285
/home/travis/build/tripal/t4d8/tripal4/web/core/tests/Drupal/Tests/BrowserTestBase.php:255
/home/travis/build/tripal/t4d8/tripal4/web/core/tests/Drupal/Tests/BrowserTestBase.php:401
This is likely just a matter of me not knowing what port, etc. the website in Travis is on... 🤞
Note: I didn't use the docker because running Drupal 8 phpunit tests are very particular of Drupal version thus I needed control to use the dev version.
I don't see a server running in travis.yml. I only checked the master branch though. We could try drush serve --uri="http://localhost:8080"
if that's what's missing.
Here are the docs for drush's serve command
Interestingly the tests fail when the server is run using drush serve and pass with apache (confirmed locally).
1) Drupal\Tests\tripal\Functional\TripalTermEntityTest::testTripalTermEntity
Behat\Mink\Exception\ResponseTextException: The text "Access denied" was not found anywhere in the text of the current page.
2) Drupal\Tests\tripal\Functional\TripalTermEntityTest::testPaths
Behat\Mink\Exception\ElementNotFoundException: Button with id|name|label|value "Log in" not found.
3) Drupal\Tests\tripal\Functional\TripalVocabEntityTest::testTripalVocabEntity
Behat\Mink\Exception\ResponseTextException: The text "Access denied" was not found anywhere in the text of the current page.
I've looked back into the docker and as expected it's the stable Drupal version so we cannot run tests on it (I tried just in case). As an alternative, I'm working to install apache using our .travis.yml.
I have tests passing on Travis! I ended up just making us a Drupal docker to work from 🤷♀
https://travis-ci.org/tripal/t4d8/builds/646549958