Skip to content

Instantly share code, notes, and snippets.

@nnattawat
Created April 10, 2020 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save nnattawat/840b8dc2430081ff306db0181b52cec9 to your computer and use it in GitHub Desktop.
Save nnattawat/840b8dc2430081ff306db0181b52cec9 to your computer and use it in GitHub Desktop.
Docker setup for Drupal with bootstrap theme
version: "2"
services:
drupal:
build:
context: .
dockerfile: drupal.Dockerfile
image: custom-drupal
ports:
- 8080:80
volumes:
- drupal-modules:/var/www/html/modules
- drupal-profiles:/var/www/html/profiles
- drupal-themes:/var/www/html/themes
- drupal-sites:/var/www/html/sites
postgres:
image: postgres:12.1
environment:
POSTGRES_DB: drupal
POSTGRES_USER: user
POSTGRES_PASSWORD: password
volumes:
- drupal-data:/var/lib/postgresql/data
volumes:
drupal-modules:
drupal-profiles:
drupal-themes:
drupal-sites:
drupal-data:
FROM drupal:8.8.2
RUN apt-get update \
&& apt-get install -y git \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /var/www/html/themes
RUN git clone --branch 8.x-3.x --single-branch --depth 1 https://git.drupal.org/project/bootstrap.git \
&& chown -R www-data:www-data bootstrap
WORKDIR /var/www/html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment