forked from codeforjapan/decidim-cfj
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request codeforjapan#628 from codeforjapan/redis-in-docker
fix: Use Redis with docker compose
- Loading branch information
Showing
2 changed files
with
29 additions
and
1 deletion.
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
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 |
---|---|---|
|
@@ -103,3 +103,19 @@ http://localhost:3000 にアクセス | |
* サービス画面 (http://localhost:3000/users/sign_in?locale=ja) | ||
* [email protected] (組織管理者) | ||
* [email protected] (通常ユーザ) | ||
|
||
## 5. キャッシュとRedisについて | ||
|
||
Railsのキャッシュはproduction環境ではRedis Cache Store(`ActiveSupport::Cache::RedisCacheStore`)を使うようになっています。 | ||
|
||
Redisの設定は環境変数 `REDIS_CACHE_URL` を使用しています。 | ||
|
||
development環境でのRailsの標準機能として、キャッシュのオン・オフをトグルで制御できます。オン・オフを切り替えたい場合、以下のコマンドを実行してください。 | ||
|
||
```console | ||
# dockerを使っている場合 | ||
docker compose run app rails dev:cache | ||
|
||
# localで動かしている場合 | ||
bin/rails dev:cache | ||
``` |