-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bundle backend as reusable library #231
Conversation
…j application that imports an Express handler from atj/server. TODO: clean up exports, get typings working.
Terraform plan for tts-10x-atj-staging Plan: 4 to add, 0 to change, 2 to destroy.Terraform used the selected providers to generate the following execution
plan. Resource actions are indicated with the following symbols:
+ create
- destroy
Terraform will perform the following actions:
# cloudfoundry_app.tts-10x-atj-staging-doj-demo_tts-10x-atj-staging-doj-demo-app_736F8430 will be destroyed
# (because cloudfoundry_app.tts-10x-atj-staging-doj-demo_tts-10x-atj-staging-doj-demo-app_736F8430 is not in configuration)
- resource "cloudfoundry_app" "tts-10x-atj-staging-doj-demo_tts-10x-atj-staging-doj-demo-app_736F8430" {
- disk_quota = 4096 -> null
- docker_image = "ghcr.io/gsa-tts/atj-platform/doj-demo:main" -> null
- enable_ssh = true -> null
- environment = (sensitive value) -> null
- health_check_http_endpoint = "/" -> null
- health_check_invocation_timeout = 0 -> null
- health_check_timeout = 0 -> null
- health_check_type = "http" -> null
- id = "828eaa40-786a-45ce-9a44-3271b1e659d5" -> null
- id_bg = "828eaa40-786a-45ce-9a44-3271b1e659d5" -> null
- instances = 1 -> null
- labels = {} -> null
- memory = 1024 -> null
- name = "tts-10x-atj-staging-doj-demo-app" -> null
- ports = [] -> null
- space = "132fc49b-e29e-40b3-8914-4233e4d4caf4" -> null
- stopped = false -> null
- strategy = "none" -> null
- timeout = 60 -> null
# (1 unchanged attribute hidden)
- routes {
- port = 0 -> null
- route = "90846ea2-699e-4416-9037-2c3b739adc90" -> null
}
}
# cloudfoundry_app.tts-10x-atj-staging-server-doj_tts-10x-atj-staging-server-doj-app_E0D2137F will be created
+ resource "cloudfoundry_app" "tts-10x-atj-staging-server-doj_tts-10x-atj-staging-server-doj-app_E0D2137F" {
+ buildpack = (known after apply)
+ disk_quota = 4096
+ docker_image = "ghcr.io/gsa-tts/atj-platform/server-doj:staging"
+ enable_ssh = (known after apply)
+ environment = (sensitive value)
+ health_check_http_endpoint = "/"
+ health_check_invocation_timeout = (known after apply)
+ health_check_timeout = (known after apply)
+ health_check_type = "http"
+ id = (known after apply)
+ id_bg = (known after apply)
+ instances = 1
+ memory = 1024
+ name = "tts-10x-atj-staging-server-doj-app"
+ ports = (known after apply)
+ space = "132fc49b-e29e-40b3-8914-4233e4d4caf4"
+ stack = (known after apply)
+ stopped = false
+ strategy = "none"
+ timeout = 60
+ routes {
+ port = (known after apply)
+ route = (known after apply)
}
}
# cloudfoundry_app.tts-10x-atj-staging-server-kansas_tts-10x-atj-staging-server-kansas-app_0CAEC23C will be created
+ resource "cloudfoundry_app" "tts-10x-atj-staging-server-kansas_tts-10x-atj-staging-server-kansas-app_0CAEC23C" {
+ buildpack = (known after apply)
+ disk_quota = 4096
+ docker_image = "ghcr.io/gsa-tts/atj-platform/server-kansas:staging"
+ enable_ssh = (known after apply)
+ environment = (sensitive value)
+ health_check_http_endpoint = "/"
+ health_check_invocation_timeout = (known after apply)
+ health_check_timeout = (known after apply)
+ health_check_type = "http"
+ id = (known after apply)
+ id_bg = (known after apply)
+ instances = 1
+ memory = 1024
+ name = "tts-10x-atj-staging-server-kansas-app"
+ ports = (known after apply)
+ space = "132fc49b-e29e-40b3-8914-4233e4d4caf4"
+ stack = (known after apply)
+ stopped = false
+ strategy = "none"
+ timeout = 60
+ routes {
+ port = (known after apply)
+ route = (known after apply)
}
}
# cloudfoundry_route.tts-10x-atj-staging-doj-demo-route will be destroyed
# (because cloudfoundry_route.tts-10x-atj-staging-doj-demo-route is not in configuration)
- resource "cloudfoundry_route" "tts-10x-atj-staging-doj-demo-route" {
- domain = "50ba3f69-cd54-4963-9172-14f3334b479e" -> null
- endpoint = "tts-10x-atj-staging-doj-demo.app.cloud.gov" -> null
- hostname = "tts-10x-atj-staging-doj-demo" -> null
- id = "90846ea2-699e-4416-9037-2c3b739adc90" -> null
- space = "132fc49b-e29e-40b3-8914-4233e4d4caf4" -> null
# (1 unchanged attribute hidden)
}
# cloudfoundry_route.tts-10x-atj-staging-server-doj-route will be created
+ resource "cloudfoundry_route" "tts-10x-atj-staging-server-doj-route" {
+ domain = "50ba3f69-cd54-4963-9172-14f3334b479e"
+ endpoint = (known after apply)
+ hostname = "tts-10x-atj-staging-server-doj"
+ id = (known after apply)
+ port = (known after apply)
+ space = "132fc49b-e29e-40b3-8914-4233e4d4caf4"
}
# cloudfoundry_route.tts-10x-atj-staging-server-kansas-route will be created
+ resource "cloudfoundry_route" "tts-10x-atj-staging-server-kansas-route" {
+ domain = "50ba3f69-cd54-4963-9172-14f3334b479e"
+ endpoint = (known after apply)
+ hostname = "tts-10x-atj-staging-server-kansas"
+ id = (known after apply)
+ port = (known after apply)
+ space = "132fc49b-e29e-40b3-8914-4233e4d4caf4"
}
Plan: 4 to add, 0 to change, 2 to destroy. 📝 Plan generated in Post Terraform plan to PR comment #43 |
…hat directly pulling the git ref
…t found some suggestions that it might.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a lot of changes here, but it looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall, I think this looks great. The one thing I wanted was a small stub of documentation due to the issues I had slacked you about with regard to getting the code in this PR running locally. Other than that LGTM.
To support customizable form service instances, this branch adds an
@atj/server
package, which is consumed by theserver-kansas
andserver-doj
applications.Things to note:
@atj/server
is an Astro server, based on the existing client-side applicationcreateServer
function, which returns an Express application that hosts the entire app. This could be modularized further, to support hosting static assets via CDN, hosting multiple form service sites on the same Express instance, etc.createServer
createServer
in the future.