Skip to content

Commit 2691b98

Browse files
committed
add docker container redis cache
1 parent 375a39b commit 2691b98

File tree

6 files changed

+645
-477
lines changed

6 files changed

+645
-477
lines changed

.env.example

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,17 @@ DB_TEST_USERNAME=root
2323
DB_TEST_PASSWORD=12345678
2424

2525
BROADCAST_DRIVER=pusher
26-
CACHE_DRIVER=file
26+
CACHE_DRIVER=redis
2727
FILESYSTEM_DISK=local
2828
QUEUE_CONNECTION=database
2929
SESSION_DRIVER=file
3030
SESSION_LIFETIME=120
3131

3232
MEMCACHED_HOST=127.0.0.1
3333

34-
REDIS_HOST=127.0.0.1
35-
REDIS_PASSWORD=null
34+
REDIS_CLIENT=predis
35+
REDIS_HOST=laravel-api-crud-template-redis
36+
REDIS_PASSWORD=redis-1234
3637
REDIS_PORT=6379
3738

3839
MAIL_MAILER=smtp

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<li>Requests validations.</li>
1010
<li>Exception handling.</li>
1111
<li>Feature testing.</li>
12+
<li>Redis Cached data and Queues</li>
1213
<li>Email sending Notification to recovery password.</li>
1314
<li>Email sending notification to verify the user.</li>
1415
<li>Queues and Jobs.</li>
@@ -240,6 +241,13 @@
240241
<strong>MAIL_FROM_ADDRESS=""</strong>
241242
</code></pre>
242243

244+
<pre><code>
245+
<strong>REDIS_CLIENT=""</strong>
246+
<strong>REDIS_HOST=""</strong>
247+
<strong>REDIS_PASSWORD=""</strong>
248+
<strong>REDIS_PORT=""</strong>
249+
</code></pre>
250+
243251
<pre><code>
244252
<strong>DB_TEST_CONNECTION=""</strong>
245253
<strong>DB_TEST_HOST=""</strong>
@@ -266,14 +274,16 @@
266274
<li><span>mariadb:11.2.2</span> - <code>:3306</code></li>
267275
<li><span>mailhog:v1.0.1</span> - <code>:1025 # smtp server</code> <code>:8025 # web ui</code>
268276
<li><span>soketi:1.6-16-debian</span> - <code>:6001 # soketi port</code> <code>:9601</code></li>
277+
<li><span>redis:7.2.4</span> - <code>:6379</code></li>
269278
</ul>
270279

271280
<h4>Containers structure:</h4>
272281
<div class="highlight highlight-source-shell"><pre>├── laravel-api-crud-template-app
273282
├── laravel-api-crud-template-web
274283
├── laravel-api-crud-template-db
275284
├── laravel-api-crud-template-smtp
276-
└── laravel-api-crud-template-soketi</pre></div>
285+
├── laravel-api-crud-template-soketi
286+
└── laravel-api-crud-template-redis</pre></div>
277287

278288
<h4>Setup:</h4>
279289
<pre>

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"laravel/tinker": "^2.8",
1515
"laravel/ui": "^4.2",
1616
"maatwebsite/excel": "^3.1",
17+
"predis/predis": "~1.0",
1718
"pusher/pusher-php-server": "^7.2"
1819
},
1920
"require-dev": {

0 commit comments

Comments
 (0)