Skip to content

Instantly share code, notes, and snippets.

@brandonkramer
Last active May 16, 2020 21:16
Show Gist options
  • Save brandonkramer/9ec79e7f33fe97028bbb4db00e8f477e to your computer and use it in GitHub Desktop.
Save brandonkramer/9ec79e7f33fe97028bbb4db00e8f477e to your computer and use it in GitHub Desktop.
Lando config file for Laravel with NGINX, PHP 7.4, XDebug, Node, NPM, MailHog and PHPMyAdmin
// In your .env file change MAIL configurations to the following to make mailhog work
MAIL_MAILER=smtp
MAIL_HOST=sendmailhog
MAIL_PORT=1025
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=test@test.nl
MAIL_FROM_NAME="${APP_NAME}"
# Replace all {project} with project name
name: laravel-{project}
recipe: laravel
config:
webroot: app/public
php: '7.4'
via: nginx # Nginx or apache
database: mysql # Mariadb or mysql
xdebug: true
config:
# https://github.com/lando/lando/blob/master/plugins/lando-services/services/php/php.ini
php: config/php.ini
# Config/httpd.conf for apache or config/nginx.conf for nginx
# https://github.com/lando/lando/blob/master/plugins/lando-services/services/nginx/nginx.conf.tpl
server: config/nginx.conf
services:
node:
type: node
overrides:
# Make ports in node environment available to localhost
ports:
- 3000:3000
- 8000:8000
globals:
gulp-cli: latest
mailhog:
type: mailhog
hogfrom:
- appserver
pma:
type: phpmyadmin
hosts:
- database
tooling:
npm:
service: node
node:
service: node
gulp:
service: node
yarn:
service: node
proxy:
# Appserver_nginx or appserver for apache
appserver_nginx:
- laravel-{project}.lndo.site
mailhog:
- mail.laravel-{project}.lndo.site
pma:
- pma.laravel-{project}.lndo.site
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment