Skip to content

Instantly share code, notes, and snippets.

@leakedby
Created June 10, 2024 10:53
Show Gist options
  • Save leakedby/3d9a12d792ff74327cc7fb4c270d51a9 to your computer and use it in GitHub Desktop.
Save leakedby/3d9a12d792ff74327cc7fb4c270d51a9 to your computer and use it in GitHub Desktop.
Laravel Stack
# Lando Laravel config
name: backend-apis
recipe: laravel
config:
php: '8.1'
webroot: public
xdebug: true
cache: redis
services:
appserver:
overrides:
environment:
XDEBUG_CONFIG: "discover_client_host=0 client_host=host.docker.internal log=/tmp/xdebug.log"
scanner:
okCodes:
- 401
build_as_root:
- "apt-get update"
- "curl -sSLf -o /usr/local/bin/install-php-extensions https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions"
- "chmod +x /usr/local/bin/install-php-extensions"
- "install-php-extensions amqp sockets"
database:
type: mariadb
hosts:
- database
volumes:
db_data: {}
overrides:
volumes:
- db_data:/var/lib/mysql
creds:
database: laravel
user: laravel
password: laravel
run_as_root:
# In this case, we need another database for sharding purposes
- "mysql -uroot -e \"CREATE DATABASE IF NOT EXISTS laravel_2; GRANT ALL PRIVILEGES ON sp_dev_2.* TO 'laravel'@'%';\""
tooling:
xdebug:
service: appserver
description: "Run xdebug commands"
cmd: "php -dxdebug.start_with_request=yes"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment