Skip to content

Commit

Permalink
add memcache service
Browse files Browse the repository at this point in the history
  • Loading branch information
sgmdlt committed Oct 18, 2024
1 parent 12495e6 commit 6a5f095
Show file tree
Hide file tree
Showing 4 changed files with 120 additions and 94 deletions.
14 changes: 14 additions & 0 deletions config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@

INTERNAL_IPS = [
'127.0.0.1',
'localhost',
]

ROOT_URLCONF = 'config.urls'
Expand Down Expand Up @@ -261,3 +262,16 @@
'all_applications': True,
'group_models': True,
}


""" DEBUG_TOOLBAR_CONFIG = {
'SHOW_TOOLBAR_CALLBACK': lambda request: True,
} """


CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.PyMemcacheCache',
'LOCATION': 'memcached:11211',
}
}
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ services:

ports:
- 5433:5432

memcached:
image: memcached:alpine
ports:
- "11211:11211"

django:
build:
Expand All @@ -26,6 +31,7 @@ services:
- 8000:8000
depends_on:
- db
- memcached

volumes:
postgres_volume:
Loading

0 comments on commit 6a5f095

Please sign in to comment.