GithubHelp home page GithubHelp logo

drupal_compose's Introduction

Drupal Compose

A simple Drupal Docker setup

Required

Docker MAC | Windows

Installing the Environment

  1. Git clone the repo. I recommend using git clone [email protected]:dgading/drupal_compose.git project-name to keep your evironments separate.
  2. In terminal open the new directory.
  3. Run docker-compose build to build the server container. It is a PHP 7.1 Apache build. This is based on the Drupal Composer project and all Core and Contrib modules added in the composer.json file will be installed in this step.
  4. Run docker-compose up to see all processes as they run or docker-compose up -d to run the containers in the background.
  5. In your browser, open the default server at http://localhost:9000.
  6. Start the Drupal installation process. The default settings are:
    1. MySql name: root
    2. MySql user: root
    3. MySql password: example
    4. In advanced dropdown, change localhost to mysql
  7. Continue with installation as normal

Using the Environment

Logging into the docker container

  1. Run docker ps.
  2. Copy the Container ID of the php contianer (it will be named something like drupalcompose_php).
  3. Run docker exec -it <container id> bash.
  4. This will open the container at /www/var/html.

Using Drush

Drush is setup to run in the Docker environment and not from your local machine. Drush is available from within the web directory in the PHP container.

Using Composer

All modules and patches should be added through composer require or composer install.

Theming

All custom module and themes should be worked on locally and their volumes will be synced with the Docker environments.

Using MySQL

Using a tool like Sequel Pro add the following connection details to the Standard tab.

  1. Host => localhost or 127.0.0.1
  2. Username => root
  3. Password => example
  4. Port => 3306 or whatever you have on line 15 in docker-compose.yml

If you want command line access:

  1. Find the mysql container with docker ps.
  2. Log into the container using docker exec -it <container id> bash
  3. Once in the container, run mysql -u root -p
  4. If you are still using the defaults, enter example at the prompt and start mysqling.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.