@@ -27,7 +27,6 @@ module "cluster" {
2727 region = var. region
2828
2929 pubpub_hostname = var. pubpub_hostname
30-
3130 route53_zone_id = var. route53_zone_id
3231
3332 container_ingress_port = 8080
@@ -43,7 +42,8 @@ module "core_dependency_services" {
4342}
4443
4544locals {
46- PUBPUB_URL = " https://${ var . pubpub_hostname } "
45+ PUBPUB_URL = " https://${ var . pubpub_hostname } "
46+ SITE_BUILDER_URL = " https://${ var . site_builder_hostname } "
4747}
4848
4949module "service_core" {
@@ -93,17 +93,11 @@ module "service_core" {
9393 { name = " MAILGUN_SMTP_USERNAME" , value = var.MAILGUN_SMTP_USERNAME },
9494 { name = " MAILGUN_SMTP_HOST" , value = var.MAILGUN_SMTP_HOST },
9595 { name = " MAILGUN_SMTP_PORT" , value = var.MAILGUN_SMTP_PORT },
96- { name = " NEXT_PUBLIC_PUBPUB_URL" , value = local.PUBPUB_URL },
97- { name = " NEXT_PUBLIC_SUPABASE_URL" , value = var.NEXT_PUBLIC_SUPABASE_URL },
98- { name = " NEXT_PUBLIC_SUPABASE_PUBLIC_KEY" , value = var.NEXT_PUBLIC_SUPABASE_PUBLIC_KEY },
9996 { name = " PUBPUB_URL" , value = local.PUBPUB_URL },
100- { name = " SUPABASE_URL" , value = var.NEXT_PUBLIC_SUPABASE_URL },
101- { name = " SUPABASE_PUBLIC_KEY" , value = var.NEXT_PUBLIC_SUPABASE_PUBLIC_KEY },
10297 { name = " HOSTNAME" , value = var.HOSTNAME },
10398 { name = " DATACITE_API_URL" , value = var.DATACITE_API_URL },
10499 { name = " VALKEY_HOST" , value = module.core_dependency_services.valkey_host },
105- // FIXME: REPLACE WITH ACTUAL SITE BUILDER ENDPOINT ONCE WE SET IT UP
106- { name = " SITE_BUILDER_ENDPOINT" , value = " https://bob.pubpub.org" }
100+ { name = " SITE_BUILDER_ENDPOINT" , value = local.SITE_BUILDER_URL }
107101 ]
108102
109103 secrets = [
@@ -167,7 +161,6 @@ module "service_bastion" {
167161 { name = " PGDATABASE" , value = module.core_dependency_services.rds_connection_components.database },
168162 { name = " PGHOST" , value = module.core_dependency_services.rds_connection_components.host },
169163 { name = " PGPORT" , value = module.core_dependency_services.rds_connection_components.port },
170- { name = " SUPABASE_URL" , value = var.NEXT_PUBLIC_SUPABASE_URL },
171164 { name = " HOSTNAME" , value = var.HOSTNAME },
172165 { name = " PAGER" , value = " less -S" },
173166 { name = " VALKEY_HOST" , value = module.core_dependency_services.valkey_host }
@@ -190,6 +183,37 @@ module "service_bastion" {
190183 }
191184}
192185
186+ module "service_site_builder" {
187+ source = " ../container-generic"
188+
189+ service_name = " site-builder"
190+ cluster_info = module. cluster . cluster_info
191+ repository_url = var. ecr_repository_urls . site_builder
192+
193+ configuration = {
194+ container_port = 4000
195+
196+ environment = [
197+ { name = " PUBPUB_URL" , value = local.PUBPUB_URL },
198+ { name = " PORT" , value = 4000 },
199+ { name = " S3_ACCESS_KEY" , value = module.core_dependency_services.asset_uploader_key_id },
200+ { name = " S3_BUCKET_NAME" , value = var.ASSETS_BUCKET_NAME },
201+ { name = " S3_REGION" , value = var.region },
202+ // don't need to set S3_ENDPOINT, if empty will use s3
203+ ]
204+
205+ secrets = [
206+ { name = " S3_SECRET_KEY" , valueFrom = module.core_dependency_services.secrets.asset_uploader_secret_key },
207+ ]
208+ }
209+
210+ resources = {
211+ cpu = 1024
212+ memory = 2048
213+ desired_count = 1
214+ }
215+ }
216+
193217
194218# N.B. This invocation means that the deployment including honeycomb cannot succeed
195219# until after you have inserted the secret into the AWS console. This only happens
0 commit comments