Created
April 10, 2020 15:52
-
-
Save nnattawat/840b8dc2430081ff306db0181b52cec9 to your computer and use it in GitHub Desktop.
Docker setup for Drupal with bootstrap theme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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