DrupalStand / drupal-dev-docker

An opinionated Drupal development environment based on Docker.
GNU General Public License v2.0
22 stars 19 forks source link

Production deployment recommendations #53

Open mwcoop opened 5 years ago

mwcoop commented 5 years ago

First, amazing work on this project. I have been looking hard for something that demonstrated an end-to-end development process for Drupal and Docker.

My ultimate deployment will be on Kubernetes (driven with Helm). I am left with a couple production deployment questions.

1) When pushing the new production images, what tasks should be performed? Should a Kubernetes job perform the equivalent of "make update"? Surround this with entering maintenance mode? 2) What about persisting sites/default/files? Any recommendations for this? In a single node configuration, is a PersistentVolume adequate?

Thanks again for the fantastic project!

jackinloadup commented 5 years ago

Thanks for reaching out @mwcoop!

This repo attempts to be unbiased for deployment methods. There is a make command which hints at how to do that. make export-prod. This command would be altered to work with your particular production setup. For example instead of exporting a tar file you could instead push the three container images to a container registry.

More to your point. We are planning on putting more examples of how to deploy DrupalStand into a production environment, but those examples will be in a different repo under the DrupalStand organization.

I'm specifically working on a project running DS with kubernetes on Azure via Helm. I'll try to get it worked into a place where I can put it in the public space here. ETA is ~2 weeks.

We hope to get some other 'examples' here as we can generalize them enough.

1) Yes, I believe you are correct to an extent. The only process I think you would need to do under the update command while in 'production' would be config-import and clear-cache all the other steps would be baked into the production exported images. Specifically those images will already contain the new composer packages, code updates.

2) If you are doing a single node then a persistant volume works fine. Just mount it at /var/www/webroot/sites/default/files

Thanks again for reaching out and we greatly appreciate the recognition. Keep an eye our for an upcoming road map toward 3.0. We are very excited to double down our efforts on making this environment as cross-platform and easy to use as possible for development purposes. While also providing the option to export production ready images.