diff --git a/.env.example b/.env.example index c8fb015..ac73271 100644 --- a/.env.example +++ b/.env.example @@ -2,7 +2,7 @@ APP_NAME=Laravel APP_ENV=local APP_KEY= APP_DEBUG=true -APP_URL=http://localhost +APP_URL=https://localhost LOG_CHANNEL=stack LOG_DEPRECATIONS_CHANNEL=null diff --git a/Dockerfile b/Dockerfile index c93d7e1..12251ce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,4 +10,4 @@ ENV COMPOSER_ALLOW_SUPERUSER=1 RUN cp $PHP_INI_DIR/php.ini-development $PHP_INI_DIR/php.ini; \ sed -i 's/variables_order = "GPCS"/variables_order = "EGPCS"/' $PHP_INI_DIR/php.ini; -ENTRYPOINT ["php", "artisan", "octane:start", "--server=frankenphp", "--host=localhost", "--port=443", "--admin-port=2019", "--https"] +ENTRYPOINT ["/bin/sh", "-c" , "composer install && php artisan octane:start --server=frankenphp --host=localhost --port=443 --admin-port=2019 --https"] diff --git a/README.md b/README.md index 6b16d5d..5278a7e 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ This is a modern, strict, strongly typed Laravel application skeleton that can b You should ensure that you have the following installed on your host machine: +* Git * Docker * Docker-compose * pnpm v8 @@ -40,28 +41,34 @@ Front end: ## Getting started -1. Install front end dependencies: - ```shell - pnpm install - ``` +1. Clone this repo: + ```shell + git clone git@github.com:philbates35/laravel-starter.git example-project + cd example-project + ``` -2. Run the Vite dev server: +2. Create the `.env` file: + ```shell + cp .env.example .env + ``` +3. Install composer dependencies, then start Octane (FrankenPHP): ```shell - pnpm run dev + docker-compose up -d ``` -3. Install composer dependencies: +4. Install front end dependencies: ```shell - docker run --rm -it -u $(id -u $USER) -v $PWD:/app composer:latest composer install + pnpm install ``` -4. Start Octane (FrankenPHP): +5. Run the Vite dev server: + ```shell - docker-compose up -d + pnpm run dev ``` -5. Go to https://localhost/, accept the potential security risk (it's a self-signed certificate), and you should see the Laravel welcome page. +6. Go to https://localhost/, accept the potential security risk (it's a self-signed certificate), and you should see the Laravel welcome page. ## Cheat sheet diff --git a/config/app.php b/config/app.php index 7920426..d4fdd98 100644 --- a/config/app.php +++ b/config/app.php @@ -57,7 +57,7 @@ | */ - 'url' => env('APP_URL', 'http://localhost'), + 'url' => env('APP_URL', 'https://localhost'), 'asset_url' => env('ASSET_URL'),