GithubHelp home page GithubHelp logo

jsonnull / lemh Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 0.0 196 KB

PHP applications running on docker using the fast, performant LEMH stack—Linux, nginx, MySQL, HHVM.

License: MIT License

Shell 100.00%

lemh's Introduction

Linux + nginx + MySQL + HHVM

jsonnull/LEMH is a docker image that makes it easy to spin up a modern LEMH stack for PHP applications. A 512mb DigitalOcean droplet easily handles minimal deployments of applications like Wordpress and esoTalk—LEMH serves pages scary fast and has a low memory footprint.

This repository is home to the docker image as well as several supported configurations for PHP applications running on LEMH.

App Purpose Version
Wordpress blogging platform 4.1.2
esoTalk forum software b2a1884

To deploy one of these apps just clone this repo, navigate to the corresponding directory in examples, and run docker-compose up.

For info on how to install and use docker-compose see https://docs.docker.com/compose/install/.

Running an app with docker-compose

Use docker-compose to declare the environment variables and start the containers.

First, edit docker-compose.yml. Here's a good starting point:

data:
  image: cogniteev/echo
  volumes:
   - /var/www
   - /var/lib/mysql

db:
  image: mariadb:latest
  ports:
   - "3306:3306"
  volumes_from:
   - data
  environment:
   - MYSQL_ROOT_PASSWORD=test
   - MYSQL_USER=app
   - MYSQL_PASSWORD=test
   - MYSQL_DATABASE=myapp

web:
  image: jsonnull/lemhpress
  links:
   - db
  ports:
   - "80:80"
  volumes_from:
   - data
  environment:
   - DB_USER=app
   - DB_PASSWORD=test
   - DB_NAME=myapp

Then run docker-compose up -d to start the daemonized containers. The server will attempt to serve PHP files from /var/wordpress.

Alternate Usage

Just run two containers with docker.

docker run -d --name db_1 -e "MYSQL_DATABASE=wordpress" -e "MYSQL_ROOT_PASSWORD=test" -p 3306:3306 mariadb:latest
docker run -d --name web_1 --link db_1:db_1 -e "DB_USER=root" -e "DB_PASSWORD=test" -p 80:80 -v "/var/www" jsonnull/lemhpress

Roadmap

Want to know what to help on? Here are some things I have in mind for this project:

  • Maintain configurations for a number of PHP applications. Configurations are pinned to a specific tag of the LEMH image, so the base image can progress without breaking existing applications, and the applications can migrate to newer images at their own pace.
  • Better configuration management—right now nginx and hhvm configurations are baked into the base image with no support for configuration of basic options via environment variables. Also, examples could show application-specific customization for nginx and HHVM if necessary.

lemh's People

Contributors

jsonnull avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 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.