Sign inSign up

devbinaural/drupal

By devbinaural

Updated about 7 years ago

Image
0

263

devbinaural/drupal repository overview

What is Drupal?

Drupal is a free and open-source content-management framework written in PHP and distributed under the GNU General Public License. It is used as a back-end framework for at least 2.1% of all Web sites worldwide ranging from personal blogs to corporate, political, and government sites including WhiteHouse.gov and data.gov.uk. It is also used for knowledge management and business collaboration.

Wikipedia Drupal

How to use this image

The basic pattern for starting a drupal instance is:

docker run --name some-drupal -d devbinaural/drupal

If you'd like to be able to access the instance from the host without the container's IP, standard port mappings can be used:

$ docker run --name some-drupal -p 8080:80 -d devbinaural/drupal

Then, access it via http://localhost:8080 or http://host-ip:8080 in a browser.

There are multiple database types supported by this image, most easily used via Docker networks. In the default configuration, SQLite can be used to avoid a second container and write to flat-files. More detailed instructions for different (more production-ready) database types follow.

When first accessing the webserver provided by this image, it will go through a brief setup process. The details provided below are specifically for the "Set up database" step of that configuration process.

MySQL

docker run --name some-drupal --network some-network -d devbinaural/drupal
  • Database type: MySQL, MariaDB, or equivalent
  • Database name/username/password: <details for> (MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE; see environment variables in the description for mysql)
  • ADVANCED OPTIONS; Database host: some-mysql (for using the DNS entry added by --network to access the MySQL container)

PostgreSQL

docker run --name some-drupal --network some-network -d devbinaural/drupal
  • Database type: PostgreSQL
  • Database name/username/password: <details for> (POSTGRES_USER, POSTGRES_PASSWORD; see environment variables in the description for postgres)
  • ADVANCED OPTIONS; Database host: some-postgres (for using the DNS entry added by --network to access the Postgres container)

docker-compose example:

version: '3.3'

services:
    drupal:
        image: devbinaural/drupal
        links:
          - "db:db"
        ports:  
        # Host machine's port 8000 will map to Drupal's port 80
          - 10000:80
        environment:
        # Drupal settings
            APACHE_RUN_USER: "#1000"
            APACHE_RUN_GROUP: "#1000"
            DRUPAL_PROFILE: standard
            DRUPAL_SITE_NAME: Drupal
            DRUPAL_USER: admin
            DRUPAL_PASS: admin
            DRUPAL_DBURL: mysql://drupal:drupal@db:10001/drupal
        volumes:
          - ./modules:/var/www/html/modules
          - ./profiles:/var/www/html/profiles
          - ./themes:/var/www/html/themes
          - ./sites:/var/www/html/sites
          - ./libraries:/var/www/html/libraries
        restart: always    

    # MySQL Server
    db:
        image: mariadb:latest
        environment:
            MYSQL_USER: drupal
            MYSQL_PASSWORD: drupal
            MYSQL_DATABASE: drupal
            MYSQL_ROOT_PASSWORD: ''
            MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
        ports:
          - "10001:3306"
        volumes:
          - ./bd:/home
        restart: always
    # PHPmyAdmim
    myadmin:
        image: phpmyadmin/phpmyadmin
        ports:
          - "10002:80"
        depends_on:
          - db

Tag summary

Content type

Image

Digest

Size

249.9 MB

Last updated

about 7 years ago

docker pull devbinaural/drupal:8.7.6