=========
STEP-1
=========
git init
git remote add origin https://github.com/rakeshsofteng/ReActAgentDemo.git
git add .
git commit -m "Initial commit for ChatBotWithUI"
git branch -M main
git push -u origin main
===================================
==> if you want to delete REPO
git push origin --delete main
git reset --soft HEAD~1
git restore --staged .
git remote remove origin
rm -rf .git
rmdir /s /q .git
====================================
==> Rest global settings
git config --global --unset user.name
git config --global --unset user.email
git config --global --unset credential.helper
git config --global credential.helper manager
git config --global user.name "rakeshsofteng"
git config --global user.email "rakeshmca@live.com"
============================================================
=> now Proper comamnds are :
# Initialize git repository
git init
# Add and commit project files
git add .
git commit -m "Initial commit - Streamlit LangGraph App"
# Create a repository on GitHub.com, then connect and push:
git branch -M main
git remote add origin https://github.com/rakeshsofteng/ReActAgentDemo.git
git push -u origin main
Imp=> to check which url is attached with origin
git remote -v
=========
STEP-2
=========
+++++++++++++++++++++++++++ Docker: +++++++++++++++++++++++++++++
=> you must first install wsl2
wsl --version =>Check for version if it already exists
wsl --install =>Install it
wsl --update =>Update it for latest.
=> below command will install Docker using cmd process: only add correct path of exe in below command
Start-Process 'C:\DATA-1\Softwares\Docker Desktop Installer.exe' -Wait -ArgumentList 'install', '--accept-license'
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
=> Docker UI and engine was not starting - after following comamnd it worked
=> open power shell with administrator privilages and then run following command:
1)
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
dism.exe /online /enable-feature /featurename:Microsoft-Hyper-V /all /norestart
bcdedit /set hypervisorlaunchtype auto
2) apart from above open %APPDATA%\Docker\
now open settings-store.json file
now add "wslEngineEnabled": false as first entry in json with in braces{ }
3) in add and remove > windows features > enable > "Windows Subsystem for LINUX"
4) do not forget to restart machine after each change, else it will not reflect.
=========
STEP-3
=========
=======On my local ===== Now create docker image and then container ==================
# Build the Docker image
docker build -t langgraph-streamlit-app .
# Run container locally on port 8501
docker run -p 8501:8501 --env-file .env langgraph-streamlit-app
=========
STEP-4
=========
===================Host build on Ubuntu server using docker ================
# Update package list and install prerequisites
sudo apt update && sudo apt upgrade -y
sudo apt install -y docker.io git
# Start Docker and enable it on boot
sudo systemctl enable --now docker
# Add Ubuntu user to the Docker group
sudo usermod -aG docker $USER
# Apply group membership changes immediately
newgrp docker
===> check if GIT and docker installed successfully.
git --version
sudo systemctl status docker
=========
STEP-5
=========
=====================================================================
==> now clone the code from GIT to LIVE ubuntu server
# Clone your repository
git clone https://github.com/rakeshsofteng/ReActAgentDemo.git
cd YOUR_REPOSITORY_NAME <= Enter into code folder.
ls <= now write ls and you will see all files listed there.
# Create production .env file [only if you want to add PROD keys to your hosted project]
nano .env
Before moving next also check which port your docker is listening currently [default is 22]:
sudo ss -tulpn | grep 22
sudo ss -tulpn | grep 80
docker ps <== lists all currently running Docker containers on your machine.
=========
STEP-6
=========
====================================================================
=> create docker image and host it now on LIVE serever ubentu.
# Build Docker image
docker build -t langgraph-app .
# Launch container in detached background mode with auto-restart
docker run -d \
--name streamlit-langgraph \
-p 80:8501 \
--restart always \
--env-file .env \
langgraph-app

