Skip to content

Instantly share code, notes, and snippets.

@prezire
Forked from nnattawat/docker-compose.yml
Created June 24, 2023 03:02
Show Gist options
  • Save prezire/4a28f5b7fc04a79cf4df43aabf168f6b to your computer and use it in GitHub Desktop.
Save prezire/4a28f5b7fc04a79cf4df43aabf168f6b 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