diff --git a/.env.example b/.env.example index 7b49625..625a2e9 100644 --- a/.env.example +++ b/.env.example @@ -19,12 +19,12 @@ LOG_STACK=single LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=debug -DB_CONNECTION=sqlite -# DB_HOST=127.0.0.1 -# DB_PORT=3306 -# DB_DATABASE=laravel -# DB_USERNAME=root -# DB_PASSWORD= +DB_CONNECTION=mysql +DB_HOST=db +DB_PORT=3306 +DB_DATABASE=refactorian +DB_USERNAME=refactorian +DB_PASSWORD=refactorian SESSION_DRIVER=database SESSION_LIFETIME=120 @@ -42,7 +42,7 @@ CACHE_PREFIX= MEMCACHED_HOST=127.0.0.1 REDIS_CLIENT=phpredis -REDIS_HOST=127.0.0.1 +REDIS_HOST=redis REDIS_PASSWORD=null REDIS_PORT=6379 diff --git a/README.md b/README.md index 021cdb2..325f55e 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,8 @@ # How To Deploy ### For first time only ! +- `git clone https://github.com/refactorian/laravel-docker.git` +- `cd laravel-docker` - `docker compose up -d --build` - `docker compose exec php bash` - `composer setup` @@ -30,6 +32,10 @@ # Notes +### Laravel Versions +- [Laravel 11.x](https://github.com/refactorian/laravel-docker/tree/main) +- [Laravel 10.x](https://github.com/refactorian/laravel-docker/tree/laravel_10x) + ### Laravel App - URL: http://localhost diff --git a/composer.json b/composer.json index 5003098..341eecf 100644 --- a/composer.json +++ b/composer.json @@ -52,10 +52,9 @@ "setup": [ "composer install", "php -r \"file_exists('.env') || copy('.env.example', '.env');\"", - "php artisan key:generate --ansi", + "php artisan key:generate", "php artisan config:cache", - "php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"", - "php artisan migrate --graceful --ansi", + "php artisan migrate", "npm install", "npm run build" ] diff --git a/docker-compose.yml b/docker-compose.yml index 872dfe7..cbf3e27 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,4 @@ version: '3' -name: laravel-project services: diff --git a/rector.php b/rector.php index 8ac06d7..aafc7fc 100644 --- a/rector.php +++ b/rector.php @@ -21,8 +21,8 @@ return RectorConfig::configure() ]) ->withSets([ SetList::DEAD_CODE, - LevelSetList::UP_TO_PHP_82, - LaravelSetList::LARAVEL_100, + LevelSetList::UP_TO_PHP_83, + LaravelSetList::LARAVEL_110, ]) ->withRules([ AddVoidReturnTypeWhereNoReturnRector::class,