-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdjango.tf
More file actions
56 lines (47 loc) · 1.78 KB
/
Copy pathdjango.tf
File metadata and controls
56 lines (47 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
resource "aws_route53_zone" "this" {
name = "geodatalytics.kitware.com"
}
data "heroku_team" "this" {
name = "kitware"
}
module "django" {
source = "kitware-resonant/resonant/heroku"
version = "3.1.1"
project_slug = "geodatalytics"
route53_zone_id = aws_route53_zone.this.zone_id
heroku_team_name = data.heroku_team.this.name
subdomain_name = "api"
django_settings_module = "uvdat.settings.heroku_production"
ec2_worker_instance_quantity = 1
ec2_worker_ssh_public_key = file("${path.module}/ssh-key.pub")
additional_django_vars = {
DJANGO_UVDAT_WEB_URL = "https://www.geodatalytics.kitware.com/"
DJANGO_DATABASE_POOL_MAX_SIZE = "12"
DJANGO_SENTRY_DSN = "https://5302701c88f1fa6ec056e0c269071191@o267860.ingest.us.sentry.io/4510620385804288"
DJANGO_UVDAT_HF_NAMESPACE = "Kitware"
DJANGO_UVDAT_HF_ENDPOINT_NAMES = "qwen=qwen3-5-9b-gguf-ulh,"
}
additional_sensitive_django_vars = {
DJANGO_UVDAT_HF_TOKEN = var.DJANGO_UVDAT_HF_TOKEN
}
django_cors_allowed_origins = [
# Can't make this use "aws_route53_record.www.fqdn" because of a circular dependency
"https://www.geodatalytics.kitware.com",
]
django_cors_allowed_origin_regexes = [
# Can't base this on "cloudflare_pages_project.www.subdomain" because of a circular dependency
"https://[\\w-]+\\.geodatalytics\\.pages\\.dev",
]
# Disable workers; they require "tasks" dependencies, which are too large for Heroku to install
heroku_worker_dyno_quantity = 0
}
resource "heroku_addon" "redis" {
app_id = module.django.heroku_app_id
plan = "heroku-redis:mini"
}
output "dns_nameservers" {
value = aws_route53_zone.this.name_servers
}
output "ec2_worker_hostnames" {
value = module.django.ec2_worker_hostnames
}