将Drupal本地环境迁移到Docker/Container [英] Migrate Drupal Local Environment to Docker/Container

查看:103
本文介绍了将Drupal本地环境迁移到Docker/Container的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前有一个使用gitlab,composer,vagrant(Drupal-VM)和虚拟盒以及其他工具(例如drush,blt和lighting core)构建的网站.我是新的容器化人员和docker,希望在改善本地环境方面有帮助

I currently have a site that is built using gitlab, composer, vagrant (Drupal-VM) and virtual box, along with other tools like drush, blt, and lighting core. I am new containerization and docker and would like some help in spinning up local environment

根据我的理解,这意味着我们几乎启动了ubuntu vbox,然后安装了"package"或包含Drupal所需的所有工具的无用信息框,然后使用blt启动应用程序.然后匆忙处理与Drupal网站的交互.

From my understanding this means we pretty much spin up a ubuntu vbox that then install a "package" or vagrant box that contains all the tools needed for Drupal, then use blt to start the app. Then drush to handle interacting with the Drupal site.

即使这些步骤似乎很简单,但是当您遇到流浪者版本,虚拟盒子,php,Drupal版本甚至操作系统升级等不匹配的问题时,此过程也可能非常困难.

Even though these seem like simple steps this process is can be very difficult when you encounter issues with having mismatching version of vagrant, virtual box, php, Drupal versions or even OS upgrade etc..

我研究了以下可能性:

  • DDev
  • Drupal-VM-Docker
  • DevDesktop
  • Drupal Docker
  • Drupal VM Docker Composer Plugin
  • Drupal VM Docker
  • Acquia Cloud IDE

如何迁移到容器并旋转使用我现有代码库的Drupal图像?

How do I migrate to a container and spin up a Drupal image that uses my preexisting code base?

站点信息: Drupal 8.9,PHP 7.3,MySQL 5.x

当前目录结构

过程如下:

  1. 带有开发的基准代码
  2. 作曲家安装
  3. 无所事事
  4. 无用的ssh
  5. blt设置
  6. 将uli -l拖入"local.site.com"
  7. 如果您更改配置(即运行drush cex -y的新字段,视图,内容类型)
  8. 然后将其添加到代码分支中,并再次运行blt setup一次,以验证其所有内容是否构建完整
  9. 然后使用 blt构件将构件部署到dev acquia云站点因素以部署到dev
  1. baseline code with develop
  2. composer install
  3. vagrant up
  4. vagrant ssh
  5. blt setup
  6. drush uli -l "local.site.com"
  7. If you make config changes (i.e new fields, views, content types you run drush cex -y)
  8. Then add to code branch and run blt setup one more time to verify its all built cleanly
  9. Then using blt artifact we deploy an artifact to the dev acquia cloud site factor to deploy to dev

推荐答案

您可以使用基于Docker的Drupal堆栈,而不管您要使用哪个OS(MAC/Linux/Windows).

You can use docker based Drupal stack irrespective of which OS(MAC/Linux/Windows) you want to use.

Github网址: https://github.com/wodby/docker4drupal

Github URL: https://github.com/wodby/docker4drupal

您将获得Drupal,MySQL,Varnish,Redis等容器的图像.

You will get containers images for Drupal, MySQL, Varnish, Redis and many more.

此处详细介绍了配置步骤: https://wodby.com/docs/1.0/stacks/drupal/local/#usage

Configurations steps are described in quite details here: https://wodby.com/docs/1.0/stacks/drupal/local/#usage

这篇关于将Drupal本地环境迁移到Docker/Container的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆