What is LEMP?
LEMP is the abbreviation for a Linux server running NGINX, MySQL (or MariaDB) and PHP. This article will describe how to draft a docker-compose.yml file to initiate a LEMP stack with Docker Compose.
docker-compose.yml
This docker-compose.yml file will create an LEMP stack.
version: '2'
services:
web:
image: nginx:latest
ports:
-"8080:80"
web:
image: naveed125/nginx-php-fpm:latest
restart: always
ports:
- "80:80"
volumes:
- ./src:/var/www/html
links:
- db
environment:
- DEPLOYMENT=development
db:
image: mysql
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ROOT_PASSWORD: B7d5ph43d
MYSQL_DATABASE: appdb
MYSQL_USER: appdbuser
MYSQL_PASSWORD: B7d5ph43d
volumes:
- ./data/mysql:/var/lib/mysql
Thanks for visiting.