Git Product home page Git Product logo

docker-drupal-nginx's Introduction

Docker Nginx for Drupal

Nginx and PHP-fpm configured for Drupal, with

Tags:

  • latest, php-5.5 - Ubuntu default
  • php-5.5.x - Latest 5.5 from ppa:ondrej
  • php-5.6.x - Latest 5.6 from ppa:ondrej
  • php-7.0.x - Latest 7.0 from ppa:ondrej

See Drupal Development with Docker Compose | Chapter Three.

Build

Extend this container as needed, with a Dockerfile

FROM tbfisher/drupal-nginx:php-5.6.x

# Configure files directory.
RUN mkdir -p /var/www_files/public && \
    mkdir -p /var/www_files/private && \
    chown -R www-data:www-data /var/www_files

# Direct ssh access to container.
COPY ./conf/ssh/authorized_keys /root/.ssh/authorized_keys

Use docker compose:

mysql:
  # https://github.com/docker-library/docs/blob/master/mysql/README.md
  image: mysql:5.5
  environment:
    MYSQL_ROOT_PASSWORD: drupal-password
    MYSQL_DATABASE: drupal
  ports:
    - "3306"

mail:
  # https://hub.docker.com/r/mailhog/mailhog/
  image: mailhog/mailhog
  ports:
   - "1025"
   - "8025"

web:
  # this references the dockerfile above
  build: ../../build/drupal-nginx-php56x
  ports:
   - "80"
   - "443"
   - "22"
  volumes:
   - /path/to/drupal/codebase:/var/www
  links:
   - mysql
   - mail

Note PHP in this build is configured to send mail to a mailhog container, which captures any outgoing mail and exposes a UI on port 8025.

docker-drupal-nginx's People

Contributors

tbfisher avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.