This project is a Occupancy management application that uses Langchain SQL agent and gemini for interacting using natural language.
It includes a Docker setup for easy deployment and management.
desk-management
├── app
│ └── main.py # Entry point of the FastAPI application
├── storage
│ ├── app.log # Application logs
│ └── db.sql # SQL dump for setting up the MySQL database
├── docker-compose.yml # Docker Compose configuration for services
├── Dockerfile # Dockerfile for building the FastAPI application image
├── requirements.txt # Dependencies for the FastAPI application
├── .env.example # Sample .env file with environment variables
└── README.md # Project documentation
-
Clone the repository:
git clone https://github.com/text2n/desk-management.git cd desk-managemnet -
Copy .env.example to .env and change configurations
cp .env.example .env Edit .env and change configurationsFor Docker deployment configure only GOOGLE_API_KEY
For generating gemini api key refer this blog for steps https://www.merge.dev/blog/gemini-api-key
-
Build and run the application using Docker Compose:
sudo docker-compose up --buildPlease wait till application is started
-
Access the application: Open your browser and go to
http://localhost:8000. -
For api documentation Open your browser and go to
http://localhost:8000/docs.
Follow steps 1 & 2 from Docker
- Create virtual environment
python3 -m venv .venv - Activate virtual environment
source .venv/bin/activate - Install dependencies
pip install -r requirements.txt - Run server
fastapi run app/main.py - Access the application:
Open your browser and go to
http://localhost:8000.
pip freeze > requirements.txt
deactivate
sudo docker build -t fastapi-template .
sudo docker run -d --name fastapicontainer -p 8000:8000 fastapi-template
sudo docker compose build
sudo docker compose up -d
sudo docker-compose down