The redis host should be the URL of the redis instance that is configured in AWS. Laravel Vapor configures ElastiCache for you for Redis. So in your AWS account, you should be able to find the URL to this instance. That should be configured as REDIS_HOST
External redis host on Forge
I'm pretty new to Forge, and I've done some searches on Google and Laracasts but can't seem to find anyone with this same scenario.
I have an existing large application running on Laravel Vapor that has a substantial Redis cache setup with it. I want this little Forge site to access the same Redis cache. I should be able to connect because I put the Forge server on the same VPC as Redis, and configured the security group for access. Basically, it's the same way Vapor connects to it, and it will be darn fast.
The problem is I can't figure out how to get Forge to point the a redis host! I'm able to use redis commands right from the get-go, which is pretty awesome, but what the heck is it connecting it? No matter what I put in my Forge environment file, it still runs off the same redis cache. The default Forge environment file says REDIS_HOST=127.0.0.1, and it seems to mean nothing.
The Forge documentation talks about how to connect to the site's cache externally, but not how to connect Forge to an external host.
I finally figured out what was going on. My AWS redis host was working the whole time!
I did a php artisan cache:clear on my Forge app and saw that everything on my Vapor app was also cleared. Then I did a Redis::keys('*') on Forge to see how I could clear the ElastiCache cluster, but not read anything. That's when I saw that all of the keys were prefixed with APP_NAME_database. I never realized that laravel adds the prefix in config/database.php behind the scenes to avoid collisions between apps. Well in my case, I wanted the 'collision' geez.
Please or to participate in this conversation.