Skip to content

Commit

Permalink
Add memcached
Browse files Browse the repository at this point in the history
  • Loading branch information
psiemens committed Jan 8, 2025
1 parent 1842d46 commit cdaebf9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
10 changes: 7 additions & 3 deletions config/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,13 @@
# 'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
# 'TIMEOUT': 3600, # 1 hour
# }
'default': {
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
'TIMEOUT': 3600, # 1 hour
# 'default': {
# 'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
# 'TIMEOUT': 3600, # 1 hour
# }
"default": {
"BACKEND": "django.core.cache.backends.memcached.PyMemcacheCache",
"LOCATION": "cache:11211",
}
}

Expand Down
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ services:
timeout: 20s
retries: 20

cache:
platform: linux/x86_64
image: memcached:1.6.10
ports:
- "11211:11211"

django:
image: ghcr.io/ubyssey/ubyssey.ca:${TAG}
command: >
Expand All @@ -39,6 +45,9 @@ services:
mysql:
condition: service_healthy
restart: true
memcached:
condition: service_started
restart: true

nginx:
image: nginx:latest
Expand Down

0 comments on commit cdaebf9

Please sign in to comment.