lukevenediger / docker-LAMP-MR

A local docker environment for the LAMP (+ Mongo & Redis) Stack

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Local Docker environemnt: PHP + MYSQL + Mongo + Redis

A local dockerized environment running:

  • PHP 7.4
  • MySQL 5.7
  • MongoDB 4.2
  • Redis 4.0

(Setup instructions for Mac users)

Require

Install Docker

Setup

Step 1 - clone environment

Clone the envormaent into a folder of your choice {MY_ENV}:

git clone https://github.com/pdphilip/docker-LAMP-MR.git MY_ENV

Step 2 - set up hosts

For example:

Step 2.1 - edit sites-enabled

in env/php/sites-enabled/

Edit domain_name variable on first line:

Define domain_name www.domain.loc
Define domain_name api.domain.loc

Step 2.2 - edit Mac host file

Via Terminal:

sudo nano /etc/hosts

Then add in:

0.0.0.0 localhost
0.0.0.0 www.domain.loc
0.0.0.0 api.domain.loc

Step 3 - docker-compose build

In repo root, run:

docker-compose build

Running:

In repo root, run:

docker-compose up

Notes:

  • Local site files root in ./sites/{domain}/html
  • Add ENV vars under the PHP container in docker-compose.yml
  • Data is persisted locally in: ./data/{engine}/

Simples

Local only please, nothing is secure

About

A local docker environment for the LAMP (+ Mongo & Redis) Stack


Languages

Language:PHP 100.0%