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

BLT + Docker + Custom Docroot #1216

Closed
sylus opened this issue Mar 20, 2017 · 2 comments
Closed

BLT + Docker + Custom Docroot #1216

sylus opened this issue Mar 20, 2017 · 2 comments
Labels
Support A support request

Comments

@sylus
Copy link

sylus commented Mar 20, 2017

Hi there ^_^. First off I really appreciate this project and am actively looking at moving some of my project over to BLT just to simplify developer workflow around a common standard. Before I give some background information to my questions I provided them below:

Questions

  1. Do you see any potential issues with me using Docker with BLT?
  2. My install profiles extend from Lightning and the docroot is /html for my install profile yet I am seeing it is mandatory to be docroot?

Background

I have a hard requirement around using Docker for my development + CI workflow. This is because thanks to Docker Registry Proxy Caching + GitLab CI I can instantiate my infrastructure in O(1) time and the workflow is incredible easy to switch between Docker Machines / Drupal environments etc. The biggest factor is we have a configured GitLab CI runner already configured with this workflow and total test times around 5-8 minutes for everything.

eval $(docker-machine env site-open-data)   
eval $(docker-machine env site-wxt)

Drupal Scaffold for Docker

https://github.com/drupal-composer-ext/drupal-scaffold-docker (Main Page)
https://github.com/drupal-composer-ext/drupal-scaffold-docker/blob/8.x/template/docker/README.md (Documentation)

I have created a composer plugin (above) that simply parses a Drupal Composer Project's composer.json file and creates a Docker scaffold around that. All the logic is contained in an added docker folder and no real adjustments are made to a Drupal Composer project other then the added controller files. The composer.json helps with the org / repo name interpolation of scaffolded Dockerfiles + and also assists in profile + docroot detection which will get written as well when the scaffold is created.

Implementations

Currently there are two public GitHub projects using this Docker workflow as well as a few private ones:

  • site-wxt (notice extra docker folder + 5 controller files)
  • site-open-data (notice extra docker folder + 5 controller files)

Tests can be accessed via Travis CI and are simply leveraging docker-compose to instantiate the infrastructure.

@grasmash
Copy link
Contributor

Do you see any potential issues with me using Docker with BLT?

Frankly I don't have much experience with Docker, but BLT is designed to be LAMP-stack agnostic, so I would not expect any issues. The LAMP requirements are essentially just the same requirements as Drupal itself.

My install profiles extend from Lightning and the docroot is /html for that install profile yet I am seeing it is mandatory to be docroot? Both can't be true?

I think you can probably just symlink docroot to html and have things work. Just make sure the symlink is relative so that it resolves regardless of filesystem.

Your https://github.com/drupal-composer-ext/drupal-scaffold-docker project sounds pretty cool!

@grasmash grasmash added the Support A support request label Mar 20, 2017
@sylus
Copy link
Author

sylus commented Mar 20, 2017

Thank you so much @grasmash I really appreciate you taking the time to respond. :)

Additionally that is exactly what I was hoping to hear!

Hopefully I can return the favor one day once I get up to speed on BLT.

Thanks again!

@sylus sylus closed this as completed Mar 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Support A support request
Projects
None yet
Development

No branches or pull requests

2 participants