My base LEMP stack for developing projects locally
Run Nginx, php-fpm and MariaDB using [Docker]
Install [Docker] and [Compose]
- php 7.1
- nginx
- mysql 5.7
- mailhog
- redis
- curl
- mcrypt
- gd
- png
- composer
- zip
- mysqli
- pdo_mysql
- soap
copy env.example .env
Once copied, set the db settings and set project name, it will prefix the containers with that project name
Modify docker/nginx.conf server_name to be the local dev url Then modify your /etc/hosts file by adding:
127.0.0.1 projectname.local
Modify the nginx.conf to point to the right public folder, for example: path/to/public, or path/to/web
Access the frontend of mailhog by pointing your web browser to: http://projectname.local:8025 or http://localhost:8025
The SMTP server will be: localhost, and the port: 1025
host: 127.0.0.1 port: 3306
Set the username and password as you set it in the .env file
docker-compose build (run the first time and anytime you modify the setup)
docker-compose up -d
docker-compose logs
docker-compose stop
docker-compose rm