0
votes

Background

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

TL;DR

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.

Problem

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..

I have looked into the following possibilities:

Question

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


Current Process and Configuration

SITE INFO: Drupal 8.9, PHP 7.3, MySQL 5.x

Current Directory Structure

The process is as follows:

  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
1
What OS are you on? Windows? Mac? Linux? I recently switched from windows to ubuntu and haven't looked back. I now use drupal docker along with a mariadb and docker-compose2pha
My local machine is running macOS, the vagrant box is ubuntu 18, and the db mysql. I want to be able mitigate all the issues that I get with my current process and move to something easier. Do you know how to do Drupal docker with mysql? My biggest confusion is I use lightning core module and sub profiles. The whole architecture makes me get lost cause I was no here when it was set upB. Cratty

1 Answers

0
votes

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

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

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

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