Get sail working
This commit is contained in:
parent
c34f355201
commit
663c2e5ae9
3 changed files with 127 additions and 1 deletions
|
@ -38,6 +38,7 @@
|
|||
"fakerphp/faker": "^1.9.2",
|
||||
"laravel/dusk": "^6.0",
|
||||
"laravel/pint": "^1.0.0",
|
||||
"laravel/sail": "^1.15",
|
||||
"mockery/mockery": "^1.0",
|
||||
"nunomaduro/collision": "^6.1",
|
||||
"phpunit/php-code-coverage": "^9.2",
|
||||
|
|
62
composer.lock
generated
62
composer.lock
generated
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "c152af902b24084f8a8b69201651179f",
|
||||
"content-hash": "0661a04d55cb19d1416d1ce0c1c005cb",
|
||||
"packages": [
|
||||
{
|
||||
"name": "aws/aws-crt-php",
|
||||
|
@ -8894,6 +8894,66 @@
|
|||
},
|
||||
"time": "2022-07-14T14:50:04+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/sail",
|
||||
"version": "v1.15.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/sail.git",
|
||||
"reference": "2fe64c0b45a3af56cac0af638c8020a8adc860d7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/sail/zipball/2fe64c0b45a3af56cac0af638c8020a8adc860d7",
|
||||
"reference": "2fe64c0b45a3af56cac0af638c8020a8adc860d7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"illuminate/console": "^8.0|^9.0",
|
||||
"illuminate/contracts": "^8.0|^9.0",
|
||||
"illuminate/support": "^8.0|^9.0",
|
||||
"php": "^7.3|^8.0"
|
||||
},
|
||||
"bin": [
|
||||
"bin/sail"
|
||||
],
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.x-dev"
|
||||
},
|
||||
"laravel": {
|
||||
"providers": [
|
||||
"Laravel\\Sail\\SailServiceProvider"
|
||||
]
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Laravel\\Sail\\": "src/"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Taylor Otwell",
|
||||
"email": "taylor@laravel.com"
|
||||
}
|
||||
],
|
||||
"description": "Docker files for running a basic Laravel application.",
|
||||
"keywords": [
|
||||
"docker",
|
||||
"laravel"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/laravel/sail/issues",
|
||||
"source": "https://github.com/laravel/sail"
|
||||
},
|
||||
"time": "2022-07-21T14:33:56+00:00"
|
||||
},
|
||||
{
|
||||
"name": "maximebf/debugbar",
|
||||
"version": "v1.18.0",
|
||||
|
|
65
docker-compose.yml
Normal file
65
docker-compose.yml
Normal file
|
@ -0,0 +1,65 @@
|
|||
# For more information: https://laravel.com/docs/sail
|
||||
version: '3'
|
||||
services:
|
||||
laravel.test:
|
||||
build:
|
||||
context: ./vendor/laravel/sail/runtimes/8.1
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
WWWGROUP: '${WWWGROUP}'
|
||||
image: sail-8.1/app
|
||||
extra_hosts:
|
||||
- 'host.docker.internal:host-gateway'
|
||||
ports:
|
||||
- '${APP_PORT:-80}:80'
|
||||
- '${VITE_PORT:-5173}:${VITE_PORT:-5173}'
|
||||
environment:
|
||||
WWWUSER: '${WWWUSER}'
|
||||
LARAVEL_SAIL: 1
|
||||
XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}'
|
||||
XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}'
|
||||
volumes:
|
||||
- '.:/var/www/html'
|
||||
networks:
|
||||
- sail
|
||||
depends_on:
|
||||
- pgsql
|
||||
- redis
|
||||
pgsql:
|
||||
image: 'postgres:14'
|
||||
ports:
|
||||
- '${FORWARD_DB_PORT:-5432}:5432'
|
||||
environment:
|
||||
PGPASSWORD: '${DB_PASSWORD:-secret}'
|
||||
POSTGRES_DB: '${DB_DATABASE}'
|
||||
POSTGRES_USER: '${DB_USERNAME}'
|
||||
POSTGRES_PASSWORD: '${DB_PASSWORD:-secret}'
|
||||
volumes:
|
||||
- 'sail-pgsql:/var/lib/postgresql/data'
|
||||
- './vendor/laravel/sail/database/pgsql/create-testing-database.sql:/docker-entrypoint-initdb.d/10-create-testing-database.sql'
|
||||
networks:
|
||||
- sail
|
||||
healthcheck:
|
||||
test: ["CMD", "pg_isready", "-q", "-d", "${DB_DATABASE}", "-U", "${DB_USERNAME}"]
|
||||
retries: 3
|
||||
timeout: 5s
|
||||
redis:
|
||||
image: 'redis:alpine'
|
||||
ports:
|
||||
- '${FORWARD_REDIS_PORT:-6379}:6379'
|
||||
volumes:
|
||||
- 'sail-redis:/data'
|
||||
networks:
|
||||
- sail
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
retries: 3
|
||||
timeout: 5s
|
||||
networks:
|
||||
sail:
|
||||
driver: bridge
|
||||
volumes:
|
||||
sail-pgsql:
|
||||
driver: local
|
||||
sail-redis:
|
||||
driver: local
|
Loading…
Add table
Reference in a new issue