From 25f192f75d987ffac1f4f86490f813e470cc614d Mon Sep 17 00:00:00 2001 From: Refringe Date: Thu, 20 Jun 2024 14:25:57 -0400 Subject: [PATCH 1/5] Update Composer Deps --- composer.lock | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/composer.lock b/composer.lock index f563681..2a175ad 100644 --- a/composer.lock +++ b/composer.lock @@ -62,16 +62,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.314.5", + "version": "3.314.6", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "0c1adaa22c3d333ac20dcc87dd355e9a013a05fd" + "reference": "d04da330b0201edab71edd33a03b8d5ad6e4a313" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/0c1adaa22c3d333ac20dcc87dd355e9a013a05fd", - "reference": "0c1adaa22c3d333ac20dcc87dd355e9a013a05fd", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/d04da330b0201edab71edd33a03b8d5ad6e4a313", + "reference": "d04da330b0201edab71edd33a03b8d5ad6e4a313", "shasum": "" }, "require": { @@ -151,9 +151,9 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.314.5" + "source": "https://github.com/aws/aws-sdk-php/tree/3.314.6" }, - "time": "2024-06-19T18:11:48+00:00" + "time": "2024-06-20T18:09:51+00:00" }, { "name": "bacon/bacon-qr-code", @@ -3989,16 +3989,16 @@ }, { "name": "nesbot/carbon", - "version": "3.5.0", + "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "415782b7e48223342f1a616c16c45a95b15b2318" + "reference": "39c8ef752db6865717cc3fba63970c16f057982c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/415782b7e48223342f1a616c16c45a95b15b2318", - "reference": "415782b7e48223342f1a616c16c45a95b15b2318", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/39c8ef752db6865717cc3fba63970c16f057982c", + "reference": "39c8ef752db6865717cc3fba63970c16f057982c", "shasum": "" }, "require": { @@ -4091,7 +4091,7 @@ "type": "tidelift" } ], - "time": "2024-06-03T17:25:54+00:00" + "time": "2024-06-20T15:52:59+00:00" }, { "name": "nette/schema", From d7a6c3db3718308289e96f9cdd7b7cac4154f7fe Mon Sep 17 00:00:00 2001 From: Refringe Date: Thu, 20 Jun 2024 14:26:23 -0400 Subject: [PATCH 2/5] Restore Banhammer Middleware --- bootstrap/app.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bootstrap/app.php b/bootstrap/app.php index 6a51221..c2e983d 100644 --- a/bootstrap/app.php +++ b/bootstrap/app.php @@ -3,6 +3,7 @@ use Illuminate\Foundation\Application; use Illuminate\Foundation\Configuration\Exceptions; use Illuminate\Foundation\Configuration\Middleware; +use Mchev\Banhammer\Middleware\IPBanned; return Application::configure(basePath: dirname(__DIR__)) ->withRouting( @@ -12,7 +13,7 @@ return Application::configure(basePath: dirname(__DIR__)) health: '/up', ) ->withMiddleware(function (Middleware $middleware) { - //$middleware->append(IPBanned::class); + $middleware->append(IPBanned::class); }) ->withExceptions(function (Exceptions $exceptions) { // From edf3b8886e0551be7d8c4538df76601697de7364 Mon Sep 17 00:00:00 2001 From: Refringe Date: Thu, 20 Jun 2024 15:06:17 -0400 Subject: [PATCH 3/5] Updated Example ENV --- .env.example | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/.env.example b/.env.example index 29346b1..b97ce5b 100644 --- a/.env.example +++ b/.env.example @@ -1,40 +1,47 @@ APP_NAME="The Forge" APP_ENV=local + +# Generate a new key with: `php artisan key:generate` APP_KEY= + APP_DEBUG=true APP_TIMEZONE=UTC -APP_URL=http://localhost +APP_URL=https://localhost APP_LOCALE=en APP_FALLBACK_LOCALE=en APP_FAKER_LOCALE=en_US VITE_APP_NAME="${APP_NAME}" -# Much higher in production. -BCRYPT_ROUNDS=12 +# Much higher in production +BCRYPT_ROUNDS=4 LOG_CHANNEL=stack LOG_STACK=single LOG_DEPRECATIONS_CHANNEL=null LOG_LEVEL=debug -# Due to the hub import script, only MySQL is supported at this time. +# Only MySQL is supported at this time. DB_CONNECTION=mysql DB_HOST=mysql DB_PORT=3306 DB_DATABASE=forge DB_USERNAME=forge DB_PASSWORD=password +DB_CHARSET=utf8mb4 +DB_COLLATION=utf8mb4_0900_ai_ci -# This is only needed if you are running the app:import-hub command. -# For normal development you should just seed the database with fake data: -# `php artisan migrate:fresh --seed` +# This is only needed if you are running the `artisan app:import-hub` command. +# For normal development you should just seed the database with fake data by +# running the command: `php artisan migrate:fresh --seed` DB_HUB_CONNECTION=mysql DB_HUB_HOST= DB_HUB_PORT= DB_HUB_DATABASE= DB_HUB_USERNAME= DB_HUB_PASSWORD= +DB_HUB_CHARSET=utf8mb4 +DB_HUB_COLLATION=utf8mb4_0900_ai_ci SESSION_DRIVER=redis SESSION_STORE=redis @@ -44,21 +51,24 @@ SESSION_ENCRYPT=false SESSION_PATH=/ SESSION_DOMAIN=null +BROADCAST_CONNECTION=log + FILESYSTEM_DISK=local ASSET_URL=http://localhost/storage ASSET_URL_LIVEWIRE=/vendor/livewire/livewire.js -CACHE_STORE=redis +CACHE_STORE=memcached + QUEUE_CONNECTION=redis REDIS_HOST=redis REDIS_PASSWORD=null REDIS_PORT=6379 REDIS_QUEUE=default -REDIS_CACHE_CONNECTION=cache SCOUT_QUEUE=true SCOUT_DRIVER=meilisearch + MEILISEARCH_HOST=http://meilisearch:7700 MEILISEARCH_KEY= MEILISEARCH_NO_ANALYTICS=true @@ -73,7 +83,7 @@ MAIL_FROM_NAME="${APP_NAME}" NOVA_LICENSE_KEY= -SAIL_XDEBUG_MODE=develop,debug,coverage - OCTANE_SERVER=frankenphp OCTANE_HTTPS=true + +SAIL_XDEBUG_MODE=develop,debug,coverage From aef89ee9fb13895ee6cb2e312c497524da3baa9a Mon Sep 17 00:00:00 2001 From: Refringe Date: Thu, 20 Jun 2024 15:56:31 -0400 Subject: [PATCH 4/5] Removes Memcached --- .env.example | 3 ++- docker-compose.yml | 7 ------- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/.env.example b/.env.example index b97ce5b..1daec04 100644 --- a/.env.example +++ b/.env.example @@ -57,7 +57,7 @@ FILESYSTEM_DISK=local ASSET_URL=http://localhost/storage ASSET_URL_LIVEWIRE=/vendor/livewire/livewire.js -CACHE_STORE=memcached +CACHE_STORE=redis QUEUE_CONNECTION=redis @@ -65,6 +65,7 @@ REDIS_HOST=redis REDIS_PASSWORD=null REDIS_PORT=6379 REDIS_QUEUE=default +REDIS_CACHE_CONNECTION=cache SCOUT_QUEUE=true SCOUT_DRIVER=meilisearch diff --git a/docker-compose.yml b/docker-compose.yml index ea1db30..3dbdf71 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -31,7 +31,6 @@ services: - redis - meilisearch - mailpit - - memcached mysql: image: 'mysql/mysql-server:8.0' ports: @@ -97,12 +96,6 @@ services: - '${FORWARD_MAILPIT_DASHBOARD_PORT:-8025}:8025' networks: - sail - memcached: - image: 'memcached:alpine' - ports: - - '${FORWARD_MEMCACHED_PORT:-11211}:11211' - networks: - - sail networks: sail: driver: bridge From 7ed504a671e93daf0b26a2e3e7ba14ae93707caa Mon Sep 17 00:00:00 2001 From: Refringe Date: Thu, 20 Jun 2024 16:30:18 -0400 Subject: [PATCH 5/5] Updates README --- .github/README.md | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/.github/README.md b/.github/README.md index 8682990..673a655 100644 --- a/.github/README.md +++ b/.github/README.md @@ -31,18 +31,25 @@ Once the Docker containers are running with Sail you can access the application | Service | Authentication | Access Via Host | |----------------------------------|----------------|-----------------------------| -| Administration Panel (Nova) | Via User Role | | +| Administration Panel (Nova*) | Via User Role | | | Redis Queue Management (Horizon) | Via User Role | | | Website Status (Pulse) | Via User Role | | | Meilisearch WebUI | Local Only | | | Mailpit WebUI | Local Only | | +*Nova may be replaced shortly due to License issues. + Most of these connection settings should already be configured in the `.env.example` file. Simply save the `.env.example` file as `.env` and adjust further settings as needed. ### Basic Usage Examples Here are some basic commands to get started with Forge: +``` +# Start the Docker containers in detached mode: +./vendor/bin/sail up -d +``` + ``` # View all of the available Artisan commands: ./vendor/bin/sail artisan @@ -54,13 +61,18 @@ Here are some basic commands to get started with Forge: ``` ``` -# Run Laravel Horizon (the queue monitor): +# Run Laravel Horizon (the queue workers/monitor): ./vendor/bin/sail artisan horizon ``` ``` -# Start the local -./vendor/bin/sail artisan horizon +# Install NPM dependencies from within the container: +./vendor/bin/sail npm install +``` + +``` +# Start the development server: +./vendor/bin/sail npm run dev ``` ### More Information @@ -79,14 +91,18 @@ Informal discussion regarding bugs, new features, and implementation of existing The `main` branch is the default branch for Forge. This branch is used for the latest stable release of the site. The `develop` branch is used for the latest development changes. All feature branches should be based on the `develop` branch. All pull requests should target the `develop` branch. +## Coding Style + +Forge follows the PSR-2 coding standard and the PSR-4 autoloading standard. We use an automated Laravel Pint action to enforce the coding standard, though it's suggested to run your code changes through Pint before contributing. This can be done by configuring your IDE to format with Pint on save, or manually by running the following command: + +``` +./vendor/bin/sail pint +``` + ## Security Vulnerabilities If you discover a security vulnerability within Forge, please email Refringe at me@refringe.com. All security vulnerabilities will be promptly addressed. -## Coding Style - -Forge follows the PSR-2 coding standard and the PSR-4 autoloading standard. We use an automated Laravel Pint action to enforce the coding standard, though it's suggested to run your code changes through Pint before contributing. - ## Code of Conduct The Forge development code of conduct is derived from the Ruby code of conduct. Any violations of the code of conduct may be reported to Refringe at me@refringe.com.