Skip to content

Commit

Permalink
CB-5 Move to app folder
Browse files Browse the repository at this point in the history
  • Loading branch information
izzat5233 committed Oct 19, 2024
1 parent 88c6ccd commit ee2614c
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ RUN pip install --no-cache-dir -r requirements.txt

EXPOSE 80

CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80"]
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,12 @@
## Description

This is the execution engine for the Chatbot Builder, responsible for executing the chatbot logic.

## Commands

### Builder & Run

```bash
docker build -t chatbot-builder-engine .
docker run -p 8083:80 chatbot-builder-engine
```
11 changes: 11 additions & 0 deletions app/api/v1/routers/test_router.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from fastapi import APIRouter

router = APIRouter()


@router.get("/ping")
async def ping():
"""
Simple endpoint to test the API setup.
"""
return {"message": "pong"}
12 changes: 12 additions & 0 deletions app/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
from fastapi import FastAPI
from app.api.v1.routers.test_router import router as test_router

# Create the FastAPI application
app = FastAPI(
title="Chatbot Builder Engine API",
description="The execution engine for the Chatbot Builder.",
version="1.0.0"
)

# Register the controllers
app.include_router(test_router, prefix="/v1", tags=["Test"])
13 changes: 0 additions & 13 deletions main.py

This file was deleted.

11 changes: 0 additions & 11 deletions test_main.http

This file was deleted.

0 comments on commit ee2614c

Please sign in to comment.