Production Deployment
Instructions on how to deploy each of our projects to our AWS instance.
Manual Deployment
Frontend
Deploying the frontends to production is relatively simple since they are just static websites served by Caddy. To deploy a site, build the site, then copy the files to the respectively directory on the AWS EC2 instance where they are being served from.
cd client
npm run build
scp -r dist/* user@host:destinationCaddy should automatically handle new requests and serve from these files.
Backend
Deploying the backend follows a similar process. First, build the Docker image, then save it into a file, send the file to the AWS EC2 instance, load the image, then rerun the Docker compose stack.
npm run docker:build
docker save -o edroplets_backend.tar edroplets_backend
scp edroplets_backend.tar user@host:destinationThe above commands send the image file to our production server. Then you may SSH into the server and run the following commands.
// Some codeAutomatic Deployment
There are GitHub Actions intended to run a deployment off a given branch. Go to the Actions tab in the repository to run a GitHub Action. You may (and should) read through the action workflows in the .github/workflows folder.
Last updated