Skip to content
Open
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
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ services:

redis:
image: redis:alpine
command: ["redis-server", "--maxmemory", "4096MB", "--maxmemory-policy", "volatile-lru"]
healthcheck:
test: ["CMD", "redis-cli", "ping"]
start_period: 30s
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ dependencies = [
# Needed for GeoDjango and "large-image[gdal]"
'gdal==3.12.3.1',
"geopandas==1.1.3",
"large-image-converter==1.34.1",
"large-image[gdal]==1.34.1",
"large-image-converter==1.34.3",
"large-image[gdal]==1.34.3",
"matplotlib==3.10.9", # for raster colormaps
"networkx==3.6.1",
"numpy==2.4.3",
Expand Down
4 changes: 4 additions & 0 deletions terraform/django.tf
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ module "django" {
resource "heroku_addon" "redis" {
app_id = module.django.heroku_app_id
plan = "heroku-redis:mini"

config = {
maxmemory_policy = "volatile-lru"
}
}

output "dns_nameservers" {
Expand Down
34 changes: 17 additions & 17 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions uvdat/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@
}
}

# Large image cache with Redis
LARGE_IMAGE_CACHE_BACKEND = "redis"
LARGE_IMAGE_CACHE_REDIS_URL = env.url("DJANGO_REDIS_URL").geturl()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where do we control the Redis database number here?

We're using Redis for other things, so I think we should have local control of this.


UVDAT_WEB_URL: str = env.url("DJANGO_UVDAT_WEB_URL").geturl()
UVDAT_ENABLE_FLOOD_SIMULATION: bool = env.bool("DJANGO_UVDAT_ENABLE_FLOOD_SIMULATION", default=True)
UVDAT_ENABLE_FLOOD_NETWORK_FAILURE: bool = env.bool(
Expand Down