diff --git a/.env.example b/.env.example index 2198412..65a4ba2 100644 --- a/.env.example +++ b/.env.example @@ -3,14 +3,23 @@ APP_DEBUG=true APP_KEY= APP_URL=http://localhost +REDIS_HOST=127.0.0.1 +# REDIS_PASSWORD= +# REDIS_PORT= +# REDIS_DB= + +# You can also use a unix socket for redis (more performant) +# REDIS_CACHE_CONNECTION=unix_socket +# REDIS_UNIX_SOCKET=/var/run/redis/redis.sock + # Using Redis as cache driver instead of files (default) is recommended -# CACHE_DRIVER=redis +CACHE_DRIVER=redis # Using syslog is recommended when not in development # APP_LOG=syslog # Set this for live reload functionality via Pusher -# BROADCAST_DRIVER=redis +# BROADCAST_DRIVER=pusher # PUSHER_KEY= # PUSHER_SECRET= # PUSHER_APP_ID= diff --git a/config/database.php b/config/database.php index 285f6a7..9cc4777 100644 --- a/config/database.php +++ b/config/database.php @@ -114,7 +114,7 @@ 'host' => env('REDIS_HOST', 'localhost'), 'password' => env('REDIS_PASSWORD', null), 'port' => env('REDIS_PORT', 6379), - 'database' => 0, + 'database' => env('REDIS_DB', 0), ], 'unix_socket' => [ diff --git a/readme.md b/readme.md index a106793..0dd4bce 100644 --- a/readme.md +++ b/readme.md @@ -9,23 +9,22 @@ Built by Simon Fredsted ([@fredsted](https://twitter.com/fredsted)). ## Requirements * PHP 7 +* Redis * Composer * Web server +Version 1.1 switched to using Redis for storage. If you want to use SQLite, you can use version 1.0. + ## Installation ### Web Server 1. Run the following commands: - 1. `cp .env.example .env` + 1. `cp .env.example .env` - adjust settings as needed 2. `php artisan key:generate` 3. `composer install` - 4. `touch database/database.sqlite` - 5. `php artisan migrate` 2. Setup virtual host pointing to the /public folder. -The above will setup Webhook Tester to use SQLite as a database. If you want to use another database type, take a look in the `config/database.php` file (SQLite will work just fine, even under heavy load.) - ### Docker A Dockerfile is available at hub.docker.com: https://hub.docker.com/r/dahyphenn/webhook.site/. @@ -34,8 +33,6 @@ A Dockerfile is available at hub.docker.com: https://hub.docker.com/r/dahyphenn/ The app was built with Laravel for the API and Angular.js for the frontend SPA. -Thanks to [Pusher](https://pusher.com) for sponsoring a plan with a higher connection limit! - Thanks to [da-n](https://github.com/da-n) for creating the Docker image. ## Donate