synced_folder "./src", "/mnt/code", type : "rsync", rsync_exclude : endĬompare this new manifest to the old one and you will notice that we reduce Vagrant's involvement in defining and managing Docker containers. synced_folder ".", "/vagrant", type : "nfs"Ĭonfig. provision :docker_compose, yml : "/vagrant/docker-compose.yml", run : "always", compose_version : "1.7.1"Ĭonfig. Inline : "sudo sed -i '/^GITHUB_OAUTH_TOKEN=/d' /etc/environment & sudo bash -c 'echo GITHUB_OAUTH_TOKEN= # > /etc/environment'" end # This is here to install Docker on the virtual machine and nothing else.Ĭonfig. Inline : " & echo '' || ln -s /vagrant/zsh/async.zsh /usr/local/share/zsh/site-functions/async" , Inline : " & echo '' || ln -s /vagrant/zsh/pure.zsh /usr/local/share/zsh/site-functions/prompt_pure_setup" , Inline : " & echo '' || ln -s /vagrant/zsh/zshrc /home/vagrant/.zshrc" , Inline : "apt-get install -y zsh & sudo chsh -s /usr/bin/zsh vagrant" , Here is a high-level tree-view of the file structure of the project:Ĭonfig. With these in mind, I'd like to share our new development environment & build process. Ultimately, we decided to explore Platform.shĪs our deployment target, so basing our build in Composer became almost imperative as Drupal 8 support (via Drush) on Platform.sh is still in beta. would probably suffice (and it doesn't incur the overhead of a running Jenkins instance). I always thought that perhaps running the build steps via docker run. Since we were mostly deploying from our local machines anyway, Our previous build utilizes a Jenkins server (also ran as a container) to perform the necessary steps to deploy changes to Pantheon. Our previous build primarily uses Drush to build the Drupal 8 site and download dependencies and relegating the resolution of some Composer dependencies to Composer Manager.ĭrush worked really well for us in the past and there is no pressing reason why we should abandon it, but considering that Composer Manager is deprecated for Drupal 8.x and that there is already aĬomposer project for Drupal sites, I thought it would be a good idea to be more proactive and rethink the way we have been doing Drupal builds and adopt the de-facto way of putting together a PHP application. Use Composer as the first-class package manager For me, introducing Docker Compose into the equation is the logical first-step.ĭlite just got into my attention quite recently which could fulfill the role of Docker for Mac before its stable release, but haven't gotten the chance to try it yet. Also with the expectation that Docker for Mac Beta will become stable in the not-so-distant future, I'd like the switch to a native Docker development environment as smooth as possible. I felt that it comes with useful features that we were missing out because we were just using Vagrant's built-in Docker provider. Colleagues using PhpStorm report that mounting the Drupal root unto the host system brings the IDE to a crawl while it indexes the files.ĭocker Compose is a great tool for managing the life-cycle of Docker containers, especially if you are running multiple applications. For example, performing a grep or ag to search within files contents under Drupal 8's core takes ~10 seconds or more. Previously, we had to mount Drupal's document root to our host machine using sshfs to explore in it, but it's not exactly performant. Having toĭo this every morning when I turn on my laptop at work was no fun. I had a tough time debugging this issue, and the only resolution in sight was to do a vagrant reload - it's a time-consuming process as it rebuilds every image and running them again. Even though Vagrant's rsync-autoĬan still detect changes on the host file-system and initiates an rsync to propel files up into the containers via a mounted volume, the changes do not really appear within the containers themselves. One issue that I keep running into when working with our development process is that the file-syncing stops working when the host machine powers off in the interim. Me to come up with an alternative process which keeps the good things we like and getting rid of/resolving the issues we encountered.įirst, I'll list some improvements that we'd like to see: Within the time-span however, we experienced a few issues here and there which led It has been working well in the several months we have used it and worked within its framework. Back in December, Tom Friedhof shared how we set up our Drupal 8 development and build process utilizing Docker.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |