Skip to content

Commit 11b0e93

Browse files
authored
Update README with deployment and CI/CD instructions
Added deployment and infrastructure provisioning details.
1 parent f31c89d commit 11b0e93

1 file changed

Lines changed: 90 additions & 1 deletion

File tree

README.md

Lines changed: 90 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,93 @@ Welcome, candidates! This project is a custom-built chatbot application that mim
8181
2. Run `npm install`
8282
3. Run `npm run dev` to start the frontend server
8383

84-
Go to `http://127.0.0.1:3000` and enjoy!
84+
Go to `http://127.0.0.1:3000` and enjoy!
85+
86+
87+
📘 Deployment Guide
88+
>Repository Setup
89+
90+
Forked the original repository
91+
Created feature branch: ash-assignment
92+
Implemented all changes in isolated branch
93+
94+
#>Local Application Setup
95+
96+
Backend Setup
97+
cd backend
98+
python -m venv venv
99+
pip install -r dependencies.txt
100+
python manage.py migrate
101+
python manage.py runserver
102+
103+
Backend accessible at:
104+
http://127.0.0.1:8000
105+
106+
Frontend Setup
107+
cd frontend
108+
npm install
109+
npm run dev
110+
111+
Frontend accessible at:
112+
http://localhost:3000
113+
114+
#>Docker Configuration
115+
116+
Created Dockerfiles for:
117+
Django backend
118+
Next.js frontend
119+
Used Docker Compose to orchestrate services:
120+
docker compose up --build
121+
Verified running containers using:
122+
docker ps
123+
124+
#>CI/CD Setup (GitHub Actions)
125+
126+
#Configured CI workflow to:
127+
Install dependencies
128+
Inject required environment variables via GitHub Secrets
129+
Run Django system checks
130+
Resolved issues related to:
131+
DJANGO_SECRET_KEY
132+
FRONTEND_URL
133+
BACKEND_URL
134+
Successfully validated CI pipeline execution.
135+
136+
#>Infrastructure Provisioning Using Terraform
137+
138+
#Created Terraform configuration to provision:
139+
EC2 instance (t3.micro)
140+
Security group (ports 22, 3000, 8000)
141+
142+
Docker installation via user_data
143+
Commands executed:
144+
terraform init
145+
terraform plan -var="key_name=YOUR_KEY_NAME"
146+
terraform apply -var="key_name=YOUR_KEY_NAME"
147+
Terraform output provided the EC2 public IP.
148+
149+
150+
#>EC2 Deployment
151+
152+
Connected via SSH:
153+
ssh -i key.pem ubuntu@<public-ip>
154+
155+
#Steps performed:
156+
Installed Docker Compose
157+
Cloned repository
158+
Started containers
159+
docker-compose up --build -d
160+
Application accessible at:
161+
http://<public-ip>:3000
162+
163+
164+
Logs / Screenshots
165+
Included:
166+
Terraform apply success output
167+
Docker running containers (docker ps)
168+
CI pipeline success
169+
170+
EC2 instance running in AWS
171+
Infrastructure Cleanup
172+
After testing:
173+
terraform destroy -var="key_name=YOUR_KEY_NAME"

0 commit comments

Comments
 (0)