Giter Club home page Giter Club logo

docker-lamp's Introduction

Dockerized LAMP environment

This provide a simple Docker Compose configuration for creating a LAMP environment.

Prerequisites

Having Docker and docker-compose isntalled, as well as a local install of composer.

How to use

Webserver

  1. Download any WordPress version, and place it in a wordpress sub-folder of the root folder (the folder where the docker-compose.yml file is located.
  2. Open a terminal and run docker-compose up -d
  3. Open a browser and go to localhost:8000/wordpress/
  4. Complete WordPress 5-min install with the following database credentials:
    • Database name: wordpress
    • Database user: wordpress
    • Database password: wordpress
    • Database host: database

Unit tests

  1. Download any WordPress version, and place it in a wordpress sub-folder of the root folder (the folder where the docker-compose.yml file is located.
  2. Download the matching version of WordPress tests utilities for PHPUnit, place the includes folder into wordpress-tests-lib.
  3. Clone Polylang, Polylang-Pro or any third-party plugin repository inside the root folder (along the docker-compose.yml file.
  4. For each plugin, run the composer install and npm install from your local machine.
  5. Open a terminal and run docker-compose up -d
  6. Check PHP running container's name with docker ps, it should look like docker-lamp_webserver_*.
  7. Connect into the running container with docker exec -it docker-lamp_webserver_*.
  8. Step into Polylang directory (cd polylang).
  9. Run the test from CLI vendor/bin/phpunit

/!\ Warning: The database used will be the same than for the webserver, so all data will be reset each time the test are run!

Removing container and data

After having run the container once, you can delete the stored databases with docker-compose down --volumes from the folder that contains the docker-compose.yml file.

docker-lamp's People

Contributors

raaaahman avatar

Stargazers

 avatar

Watchers

 avatar  avatar  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.