Posts

Showing posts from July, 2024

NodeJS dotenv .env: Which comes first? .env or environment var defined in Cloudformation?

As of this writing, in short: Cloud formation comes first. If you are using dotenv (.env), and you define the same variable as in your cloud formation template, cloud formation template will override the value in your .env

Laravel 11 cannot connect to Redis (serverless) - Checking points

Image
 If you are having trouble connecting to Redis server (usually AWS, other cloud platform applied as well), here are some of my tested ideas to check. All points are valid as of this writing, under Laravel 11 (Using Nginx + php-fpm, all dockerize), and build/executed in AWS ECS As of this writing(5 Jul 2024), please use REDIS_CLIENT = phpredis.  predis did not work.  It will not able to connect to your AWS redis (serverless) server.  Yet it works if you setup in your local development In my setting, REDIS_CLUSTER = rediss (double s), before that default value is `redis` There are 3 array sections: default, cache and session default: according to this git comment , this is for "normal" server.  I guess it means standalone server.  Which means the settings under default is for normal server. cache: These settings are for cluster.  I found that serverless = cluster. session: These settings are for sessions, if you are saving session data in redis In other words, you cannot assume