Drupal
Advanced open source content management platform.
Directory Structure
- .env
- docker-compose.yml
docker-compose.yml (Docker Community)
# Drupal with PostgreSQL
#
# Access via "http://localhost:8080"
# (or "http://$(docker-machine ip):8080" if using docker-machine)
#
# During initial Drupal setup,
# Database type: PostgreSQL
# Database name: postgres
# Database username: postgres
# Database password: example
# ADVANCED OPTIONS; Database host: postgres
version: '3.1'
services:
drupal:
image: drupal:10-apache
ports:
- 8080:80
volumes:
- /var/www/html/modules
- /var/www/html/profiles
- /var/www/html/themes
# this takes advantage of the feature in Docker that a new anonymous
# volume (which is what we're creating here) will be initialized with the
# existing content of the image at the same location
- /var/www/html/sites
restart: always
postgres:
image: postgres:16
environment:
POSTGRES_PASSWORD: example
restart: alwaysdocker-compose.yml (Bitnami)
version: '2'
services:
mariadb:
image: docker.io/bitnami/mariadb:11.4
environment:
# ALLOW_EMPTY_PASSWORD is recommended only for development.
- ALLOW_EMPTY_PASSWORD=yes
- MARIADB_USER=bn_drupal
- MARIADB_DATABASE=bitnami_drupal
volumes:
- './mariadb_data:/bitnami/mariadb'
drupal:
image: docker.io/bitnami/drupal:10
ports:
- '80:8080'
- '443:8443'
environment:
- DRUPAL_DATABASE_HOST=mariadb
- DRUPAL_DATABASE_PORT_NUMBER=3306
- DRUPAL_DATABASE_USER=bn_drupal
- DRUPAL_DATABASE_NAME=bitnami_drupal
# ALLOW_EMPTY_PASSWORD is recommended only for development.
- ALLOW_EMPTY_PASSWORD=yes
volumes:
- './drupal_data:/bitnami/drupal'
depends_on:
- mariadb
restart: alwaysResources
Website: https://www.drupal.org/
Docker Hub (Docker Community): https://hub.docker.com/_/drupal
Docker Hub (Bitnami): https://hub.docker.com/r/bitnami/drupal
Configuration: See the Docker Hub pages