Skip to content

Deploy mljsapi, madliberationjs to a CloudFront distro with API Gateway and S3 #254

Closed
@douglasnaphas

Description

@douglasnaphas

TODO

  • Run the API locally with SAM, from madliberation/. We're actually going to run with straight node, because incorporating SAM into the Docker setup is too hard, because SAM itself starts up a container
  • Set up nginx config to reverse proxy from a port to another service
  • Access the API (running with SAM outside of Docker) via port that talks to nginx. This will involve running sam local start-api with the --docker-network option. Won't do. There's no way for the nginx conf file to reference the out-of-Docker running API, at least not without doing container networking that I don't know how to do. Running with node is close enough to how it will be run in prod
  • Run the API locally with SAM, Docker, and docker-compose.
  • Try to run the SAM CLI Docker container from docker-compose. Try something like mapping the volume from madliberation/mljsapi.
  • Add an S3 bucket.
  • (live site) Add a div to the frontend on the About page containing the config values that I will inject, if they are present.
  • (live site) Inject the values (api.passover.lol for the backend, and the redirect URI) that I need for the app to function normally, and confirm they are present in the attributes of the added div
  • Switch the frontend to using the injected values, with the current location as default. Validate by observing the (failing) call on the new frontend to /scripts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cdkUse the AWS CDK for infra code and deployment

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions