Skip to content

qadan/docker-scaffold

 
 

Repository files navigation

Docker Scaffold for Drupal

Provides an barebones, fast, and lightweight local / CI docker environment to work with Drupal.

Pre-Requisites

You need to be using Docker Compose V2 and ensure the version >= v2.15.0.

Setup

Installation is relatively straight forward as long as you are managing your site dependencies with Composer.

All of these commands must be run at the root of the Composer Project where the composer.json file exists.

Clone the docker-scaffold repository:

git clone https://github.com/drupalwxt/docker-scaffold.git docker

Note: The docker folder should be added to your .gitignore file.

Create the necessary symlinks:

ln -s docker/docker-compose.base.yml docker-compose.base.yml
ln -s docker/docker-compose.ci.yml docker-compose.ci.yml
ln -sf docker/docker-compose.yml docker-compose.yml

Create and adjust the following Makefile:

include .env
NAME := $(or $(BASE_IMAGE),$(BASE_IMAGE),drupalwxt/site-wxt)
VERSION := $(or $(VERSION),$(VERSION),'latest')
PLATFORM := $(shell uname -s)
$(eval GIT_USERNAME := $(if $(GIT_USERNAME),$(GIT_USERNAME),gitlab-ci-token))
$(eval GIT_PASSWORD := $(if $(GIT_PASSWORD),$(GIT_PASSWORD),$(CI_JOB_TOKEN)))
DOCKER_REPO := https://github.com/drupalwxt/docker-scaffold.git
GET_DOCKER := $(shell [ -d docker ] || git clone $(DOCKER_REPO) docker)
include docker/Makefile

Example

You can see the docker-scaffold in use in the site-wxt repository:

Documentation

For more information please consult the documentation:

About

Docker Scaffold for Drupal WxT

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 71.3%
  • Shell 14.8%
  • Dockerfile 8.2%
  • Makefile 5.7%