{"id":19866484,"url":"https://github.com/devopsmakers/docker-lemp","last_synced_at":"2025-05-02T06:30:34.822Z","repository":{"id":95879252,"uuid":"81720687","full_name":"devopsmakers/docker-lemp","owner":"devopsmakers","description":"A simple Docker Compose project to setup PHP 7, Nginx and MySQL 5.7 for dev, testing and fun. ","archived":false,"fork":false,"pushed_at":"2017-02-12T14:03:00.000Z","size":7,"stargazers_count":12,"open_issues_count":0,"forks_count":5,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-06T23:13:24.484Z","etag":null,"topics":["docker","mysql","nginx","php7","simple","testing"],"latest_commit_sha":null,"homepage":null,"language":"Nginx","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devopsmakers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-12T11:19:21.000Z","updated_at":"2021-04-22T02:28:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"f425a766-76ca-4690-a37d-edcf2a7c3242","html_url":"https://github.com/devopsmakers/docker-lemp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devopsmakers%2Fdocker-lemp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devopsmakers%2Fdocker-lemp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devopsmakers%2Fdocker-lemp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devopsmakers%2Fdocker-lemp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devopsmakers","download_url":"https://codeload.github.com/devopsmakers/docker-lemp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251998027,"owners_count":21677913,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","mysql","nginx","php7","simple","testing"],"created_at":"2024-11-12T15:26:01.380Z","updated_at":"2025-05-02T06:30:34.812Z","avatar_url":"https://github.com/devopsmakers.png","language":"Nginx","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dockerized LEMP Environment\n\n## What's this all about?\nI like to try out new web (PHP) based apps. I also need to test existing apps on PHP 7.\n\nThis repo makes it really simple with docker-compose but is in no way production ready.\nConfigs are minimal and security hasn't been taken into consideration.\n\nIt's purely for dev / testing / fun purposes.\n\n## How do I use it?\n1. Extract your application to: `./app`\n2. Run `docker-compose up`\n3. Configure your application to use the following DB settings:\n    * Host / Server: db\n    * Username: root\n    * Password: password\n    * Database Name: application\n\n### Help! I need to install PHP modules!?!\nIt's really simple. Edit: `./php/Dockerfile` and add the module name to a new\n`RUN` instruction line. For example to add the `redis` PHP module:\n```\nRUN /usr/local/bin/docker-php-ext-install pdo pdo_mysql\n\nRUN /usr/local/bin/docker-php-ext-install redis\n```\n\u003e Why not just add it to the end of the existing RUN instruction?\n\u003e Docker caches the resulting changes from instructions in image layers.\n\u003e By adding a new RUN line we avoid downloading and building the existing\n\u003e modules again.\n\nSome modules may require adding libraries or other packages. There's plenty of references\nout there on doing this with the alpine Linux Docker containers.\n\n## Example: Test PHP Server Monitor - https://www.phpservermonitor.org/\n(The original reason I came up with this easy way of testing PHP apps)\n\n* Download PHP Server Monitor from: http://www.phpservermonitor.org/download/\n* Extract the contents to the `./app` folder\n* Run `docker-compose up`\n* Go to http://localhost:8080 to see the app (You should get the installation page)\n\n# Example 2: Trying out Drupal 8 - https://www.drupal.com/\nThis is a bit more complex than the initial example. We need to install extra\nPHP modules and OS libraries.\n\n* Download the latest Drupal 8 (8.2.6 at time of writing) from:\n  https://www.drupal.org/project/drupal/releases/8.2.6\n* Extract the content to the `./app` folder\n* Run `docker-compose up`\n* Go to http://localhost:8080 and see the installation page.\n\nAt this point Drupal looks okay but if you click through the installation you.ll\nget to the *Verify Requirements* page and have a nice big red error and warning due\nto missing PHP modules.\n\n## Add the `gd` PHP module\n* Edit `./php/Dockerfile` and add: `RUN /usr/local/bin/docker-php-ext-install gd`\n* Run `docker-compose build` and everything should now be great!\n\n## Installing required libs\nOkay, I lied in my last comment. The PHP module will fail to install due to\nmissing lib / dev packages. Let's install them:\n\n* Edit `./php/Dockerfile` and amend the line:\n  `RUN /usr/local/bin/docker-php-ext-install opcache gd` to:\n\n```\nRUN apk add --update libpng-dev libjpeg-turbo-dev \u0026\u0026 \\\n    /usr/local/bin/docker-php-ext-install opcache gd\n```\n* Run `docker-compose build` again and I promise everything will (should) work out fine.\n* Refresh your browser page and the error *should* be gone.\n\nYou can continue with the installation and have Drupal FUN!!\n\n# Common tasks\nTo make things a little easier there's a Makefile that helps make various tasks a\nbit quicker / safer:\n\n* `make` restarts the docker-compose cluster\n* `make up` builds and brings the cluster up\n* `make stop` you guessed it: stops the cluster\n* `make interactive` brings the cluster up in the foreground\n* `make clean` removes the contents of `./app` and `./db/data` - **DESTRUCTIVE**\n* `make reset` stops the cluster, cleans `./app` and `./db/data` and performs a\n  hard git reset on the repo to reset everything - **SUPER-DESTRUCTIVE**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevopsmakers%2Fdocker-lemp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevopsmakers%2Fdocker-lemp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevopsmakers%2Fdocker-lemp/lists"}