Skip to content

Instantly share code, notes, and snippets.

@SamuelMwangiW
Last active February 6, 2024 23:10
Show Gist options
  • Select an option

  • Save SamuelMwangiW/0362e0fd8b501199f21798c0c3d0fe09 to your computer and use it in GitHub Desktop.

Select an option

Save SamuelMwangiW/0362e0fd8b501199f21798c0c3d0fe09 to your computer and use it in GitHub Desktop.
A minimal docker-compose.yaml required to run Laravel Sail
version: '3'
services:
laravel.test:
build:
context: ./vendor/laravel/sail/runtimes/8.3
dockerfile: Dockerfile
args:
WWWGROUP: '${WWWGROUP}'
image: sail-8.3/app
ports:
- '${APP_PORT:-80}:80'
environment:
WWWUSER: '${WWWUSER}'
LARAVEL_SAIL: 1
volumes:
- '.:/var/www/html'
depends_on:
- mariadb
mariadb:
image: 'mariadb:10'
environment:
MARIADB_DATABASE: '${DB_DATABASE}'
MARIADB_USER: '${DB_USERNAME}'
MARIADB_PASSWORD: '${DB_PASSWORD}'
MARIADB_RANDOM_ROOT_PASSWORD: 'yes'
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-u${DB_USERNAME}", "-p${DB_PASSWORD}"]
retries: 3
timeout: 5s
mailpit:
image: 'axllent/mailpit:latest'
ports:
- '${FORWARD_MAILHOG_DASHBOARD_PORT:-8025}:8025'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment