-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(heroku redis): integrate redis server on heroku and docker
- add heroku redis addon on heroku - create redis url env - create redis config file - test the heroku redis - add redis image to docker-compose.yml [maintains #168190297]
- Loading branch information
1 parent
1785edf
commit dd2f8bf
Showing
5 changed files
with
24 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,5 @@ APP_EMAIL = "" | |
SEND_GRID_API_KEY= "" | ||
BASE_URL = "http://localhost:3000" | ||
SIGNIN_PAGE = "" | ||
|
||
REDIS_URL= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import Redis from 'ioredis'; | ||
import './env'; | ||
|
||
const env = process.env.NODE_ENV || 'development'; | ||
|
||
const config = { | ||
development: '', | ||
production: process.env.REDIS_URL | ||
}; | ||
|
||
const redisUrl = config[env]; | ||
|
||
const redis = new Redis(redisUrl); | ||
|
||
export default redis; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters