mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-03 12:22:38 +02:00
add copilot dockerfile
This commit is contained in:
parent
a19dedd59f
commit
1d20e2cb97
4 changed files with 26 additions and 1 deletions
2
apps/copilot/.dockerignore
Normal file
2
apps/copilot/.dockerignore
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
__pycache__/
|
||||||
|
venv/
|
||||||
21
apps/copilot/Dockerfile
Normal file
21
apps/copilot/Dockerfile
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
# Use official Python runtime as base image
|
||||||
|
FROM python:3.11-slim
|
||||||
|
|
||||||
|
# Set working directory in container
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy requirements file
|
||||||
|
COPY requirements.txt .
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
|
|
||||||
|
# Copy project files
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Expose port if your app needs it (adjust as needed)
|
||||||
|
ENV HOSTNAME="0.0.0.0"
|
||||||
|
ENV PORT=3001
|
||||||
|
|
||||||
|
# Command to run the application
|
||||||
|
CMD ["python", "app.py"]
|
||||||
|
|
@ -4,6 +4,7 @@ from pydantic import BaseModel, ValidationError
|
||||||
from typing import List
|
from typing import List
|
||||||
from copilot import UserMessage, AssistantMessage, get_response
|
from copilot import UserMessage, AssistantMessage, get_response
|
||||||
from lib import AgentContext, PromptContext, ToolContext, ChatContext
|
from lib import AgentContext, PromptContext, ToolContext, ChatContext
|
||||||
|
import os
|
||||||
|
|
||||||
openai_client = OpenAI()
|
openai_client = OpenAI()
|
||||||
|
|
||||||
|
|
@ -76,4 +77,4 @@ def chat():
|
||||||
}), 500
|
}), 500
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app.run(debug=True)
|
app.run(host=os.getenv('HOST', '0.0.0.0'), port=int(os.getenv('PORT', 3001)), debug=True)
|
||||||
|
|
@ -63,4 +63,5 @@ ENV PORT=3000
|
||||||
# server.js is created by next build from the standalone output
|
# server.js is created by next build from the standalone output
|
||||||
# https://nextjs.org/docs/pages/api-reference/config/next-config-js/output
|
# https://nextjs.org/docs/pages/api-reference/config/next-config-js/output
|
||||||
ENV HOSTNAME="0.0.0.0"
|
ENV HOSTNAME="0.0.0.0"
|
||||||
|
ENV PORT=3000
|
||||||
CMD ["node", "server.js"]
|
CMD ["node", "server.js"]
|
||||||
Loading…
Add table
Add a link
Reference in a new issue