RAG Setup
Launch EC2 or equivalent (t3a.small)
Update Apt
sudo apt-get update && sudo apt-get upgrade -y
Install Docker
sudo apt-get docker.io -y
Clone the repo (add required permissions for repo access to the instance)
Fix the docker permissions issue (if the issue persists)
## Docker Permission Denied Issue:
sudo usermod -a -G docker $USER
newgrp docker
Install Docker Compose
Add apt repositories
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
Install the docker Packages
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Add the Route53 Record
Add the route53 record for the subdomain you need to access the rag in.
Update the Docker Compose Config
Update the domain required for redirection in
docker-compose.yml
Set the stage to
staging
until the cert verification is done
Configure Env variables
If you've used any env variables in the docker-compose, do set those in the bash
Run the server
docker compose up -d
Last updated