Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ⚡ Adding Redis Cache defauilt configuration #66

Merged
merged 1 commit into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .env.redis
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
REDIS_PASSWORD=redisUserPass123
CACHE_BACKEND=django.core.cache.backends.redis.RedisCache
CACHE_URL=redis://:redisUserPass123@redis:6379
CACHE_OPTIONS={}
4 changes: 4 additions & 0 deletions .env.redis.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
REDIS_PASSWORD=redisUserPass123
CACHE_BACKEND=django.core.cache.backends.redis.RedisCache
CACHE_URL=redis://:redisUserPass123@redis:6379
CACHE_OPTIONS={}
19 changes: 19 additions & 0 deletions docker-compose.cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
services:
redis:
container_name: ${PROJECT_NAME:-openimis}-redis
image: redis:latest
restart: always
ports:
- "6379:6379"
command: redis-server /usr/local/etc/redis/redis.conf --requirepass ${REDIS_PASSWORD}
volumes:
- ./dаta/redis/database:/data
- ./data/redis.conf:/usr/local/etc/redis/redis.conf
env_file:
- ".env.redis"
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD}
- REDIS_PORT=6379
- REDIS_DATABASES=1
networks:
openimis-net:
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ include:
env_file:
- .env
- .env.lightning
- path: docker-compose.cache.yml
env_file:
- .env
- .env.redis
# - path: docker-compose.certbot.yml


Expand Down
Loading