-
Notifications
You must be signed in to change notification settings - Fork 3
Deployment
To serve our application, we use AWS Elastic Beanstalk. This is an application deployment service often categorized as a "Platform as a Service". Read more here.
Elastic Beanstalk will take Dockerrun.aws.json
as input, spin up a Docker container, and set up the network so that the app server is exposed through a public IP. To make beehive.berkeley.edu point to this public IP, we had to set up an arrangement with Berkeley's Hostmaster. Hopefully, no one will ever need to worry about this again.
In Spring 2020, we set up a workflow that allows changes that hit the master
branch to automatically get deployed. This is done through AWS CodePipeline, which has three parts: 1) Source pulls from GitHub, 2) Build creates the image and pushes it to our Docker Hub repo, and 3) Deploy feeds the Dockerrun.aws.json
file to Elastic Beanstalk, which then (re-)deploys the app. Because it is so effortless to deploy, we should be careful not to accidentally push to master
. Instead, push to the staging
branch while developing.
This file holds the config for the production environment, namely the env vars and the port mapping. If we ever edit anything in this file, we need to update it in AWS Secrets Manager, which is where the Deploy stage of AWS CodePipeline looks for this file.