diff --git a/.env.example b/.env.example new file mode 100644 index 00000000..ed9003cf --- /dev/null +++ b/.env.example @@ -0,0 +1,11 @@ +OPENAI_API_KEY= +MONGODB_CONNECTION_STRING= +AUTH0_SECRET= +AUTH0_BASE_URL= +AUTH0_ISSUER_BASE_URL= +AUTH0_CLIENT_ID= +AUTH0_CLIENT_SECRET= +FIRECRAWL_API_KEY= +OXYLABS_USERNAME= +OXYLABS_PASSWORD= +CHAT_WIDGET_SESSION_JWT_SECRET= \ No newline at end of file diff --git a/.gitignore b/.gitignore index e43b0f98..be47843e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ .DS_Store +.env diff --git a/README.md b/README.md index d73c40f3..662c0f23 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,33 @@ # RowBoat monorepo This is the monorepo for RowBoat. + +## Setup and Run + +To set up and run RowBoat, follow these steps: + +1. **Create a `.env` File:** + + First, create a `.env` file in the root directory of the project. You can use the `.env.example` file as a template. Copy the contents of `.env.example` and replace the placeholder values with your actual configuration values. + + ```bash + cp .env.example .env + ``` + + Edit the `.env` file to include your specific API keys and secrets. + +2. **Build and Run Service:** + + Use Docker Compose to build and run the RowBoat service: + + ```bash + docker-compose up --build + ``` + + This command will build the Docker image and start the service. + +3. **Access the Application:** + + Once the service is running, you can access RowBoat via: + + - `http://localhost:3000` diff --git a/apps/agents/Dockerfile b/apps/agents/Dockerfile index 70ff9926..a3044af5 100644 --- a/apps/agents/Dockerfile +++ b/apps/agents/Dockerfile @@ -24,4 +24,4 @@ ENV FLASK_APP=src.app.main ENV PYTHONUNBUFFERED=1 # Command to run Flask development server -CMD ["flask", "run", "--host=0.0.0.0", "--port=3002"] +CMD ["flask", "run", "--host=0.0.0.0", "--port=3001"] diff --git a/apps/copilot/Dockerfile b/apps/copilot/Dockerfile index 1157f415..9345a757 100644 --- a/apps/copilot/Dockerfile +++ b/apps/copilot/Dockerfile @@ -14,8 +14,8 @@ RUN pip install --no-cache-dir -r requirements.txt COPY . . # Expose port if your app needs it (adjust as needed) -ENV HOSTNAME="0.0.0.0" -ENV PORT=3001 +ENV FLASK_APP=app +ENV PYTHONUNBUFFERED=1 -# Command to run the application -CMD ["python", "app.py"] +# Command to run Flask development server +CMD ["flask", "run", "--host=0.0.0.0", "--port=3002"] diff --git a/apps/copilot/app.py b/apps/copilot/app.py index 531d0908..c381a6e5 100644 --- a/apps/copilot/app.py +++ b/apps/copilot/app.py @@ -77,4 +77,5 @@ def chat(): }), 500 if __name__ == '__main__': - app.run(host=os.getenv('HOST', '0.0.0.0'), port=int(os.getenv('PORT', 3001)), debug=True) \ No newline at end of file + print("Starting Flask server...") + app.run(port=5000, debug=True) \ No newline at end of file diff --git a/apps/rowboat/components/ui/resizable.tsx b/apps/rowboat/components/ui/resizable.tsx index f4bc5586..cb0ead68 100644 --- a/apps/rowboat/components/ui/resizable.tsx +++ b/apps/rowboat/components/ui/resizable.tsx @@ -3,7 +3,7 @@ import { GripVertical } from "lucide-react" import * as ResizablePrimitive from "react-resizable-panels" -import { cn } from "@/lib/utils" +import { cn } from "../../lib/utils" const ResizablePanelGroup = ({ className, diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..bc09183c --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,44 @@ +version: '3.8' + +services: + rowboat: + build: + context: ./apps/rowboat + dockerfile: Dockerfile + ports: + - "3000:3000" + environment: + - OPENAI_API_KEY=${OPENAI_API_KEY} + - MONGODB_CONNECTION_STRING=${MONGODB_CONNECTION_STRING} + - FIRECRAWL_API_KEY=${FIRECRAWL_API_KEY} + - OXYLABS_USERNAME=${OXYLABS_USERNAME} + - OXYLABS_PASSWORD=${OXYLABS_PASSWORD} + - CHAT_WIDGET_SESSION_JWT_SECRET=${CHAT_WIDGET_SESSION_JWT_SECRET} + - AGENTIC_API_URL=http://agents:3001 + - COPILOT_API_URL=http://copilot:3002 + - AUTH0_SECRET=${AUTH0_SECRET} + - AUTH0_BASE_URL=${AUTH0_BASE_URL} + - AUTH0_ISSUER_BASE_URL=${AUTH0_ISSUER_BASE_URL} + - AUTH0_CLIENT_ID=${AUTH0_CLIENT_ID} + - AUTH0_CLIENT_SECRET=${AUTH0_CLIENT_SECRET} + restart: unless-stopped + + agents: + build: + context: ./apps/agents + dockerfile: Dockerfile + ports: + - "3001:3001" + environment: + - OPENAI_API_KEY=${OPENAI_API_KEY} + restart: unless-stopped + + copilot: + build: + context: ./apps/copilot + dockerfile: Dockerfile + ports: + - "3002:3002" + environment: + - OPENAI_API_KEY=${OPENAI_API_KEY} + restart: unless-stopped \ No newline at end of file