1 Commits

Author SHA1 Message Date
Mason Egger
9a71565121 relocking Poetry lock file to align with pyproject.toml 2025-05-08 11:58:40 -05:00
4 changed files with 4 additions and 195 deletions

View File

@@ -1,30 +0,0 @@
FROM python:3.10-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends gcc build-essential && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Copy requirements first for better caching
RUN pip install --no-cache-dir poetry
# Install Python dependencies without creating a virtualenv
COPY pyproject.toml poetry.lock ./
RUN poetry config virtualenvs.create false \
&& poetry install --without dev --no-interaction --no-ansi --no-root
# Copy application code
COPY . .
# Set Python to run in unbuffered mode (recommended for Docker)
ENV PYTHONUNBUFFERED=1
ENV PYTHONPATH=/app
# Expose the port the app will run on
EXPOSE 8000
# Default to running only the API server; worker and train-api are separate Compose services
CMD ["uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "8000"]

View File

@@ -1,20 +0,0 @@
services:
api:
volumes:
- ./:/app:cached
command: uvicorn api.main:app --host 0.0.0.0 --port 8000 --reload
worker:
volumes:
- ./:/app:cached
command: python scripts/run_worker.py
train-api:
volumes:
- ./:/app:cached
command: python thirdparty/train_api.py
frontend:
volumes:
- ./frontend:/app:cached
command: sh -c "apk update && apk add --no-cache xdg-utils && npm install && npx vite --host 0.0.0.0 --port 5173"

View File

@@ -1,120 +0,0 @@
services:
# Database service
postgresql:
image: postgres:14
container_name: temporal-postgresql
environment:
POSTGRES_USER: temporal
POSTGRES_PASSWORD: temporal
POSTGRES_DB: temporal
volumes:
- postgresql:/var/lib/postgresql/data
networks:
- temporal-network
# Temporal services
temporal:
image: temporalio/auto-setup:1.27.2
container_name: temporal
ports:
- "7233:7233"
environment:
- DB=postgres12
- DB_PORT=5432
- POSTGRES_USER=temporal
- POSTGRES_PWD=temporal
- POSTGRES_SEEDS=postgresql
depends_on:
- postgresql
networks:
- temporal-network
temporal-admin-tools:
image: temporalio/admin-tools:1.27
container_name: temporal-admin-tools
depends_on:
- temporal
environment:
- TEMPORAL_CLI_ADDRESS=temporal:7233
networks:
- temporal-network
temporal-ui:
image: temporalio/ui:2.37.2
container_name: temporal-ui
ports:
- "8080:8080"
environment:
- TEMPORAL_ADDRESS=temporal:7233
- TEMPORAL_CORS_ORIGINS=http://localhost:8080
depends_on:
- temporal
networks:
- temporal-network
api:
build:
context: .
dockerfile: Dockerfile
container_name: temporal-ai-agent-api
ports:
- "8000:8000"
depends_on:
- temporal
networks:
- temporal-network
env_file:
- .env
environment:
- TEMPORAL_ADDRESS=temporal:7233
worker:
build:
context: .
dockerfile: Dockerfile
container_name: temporal-ai-agent-worker
depends_on:
- temporal
env_file:
- .env
environment:
- TEMPORAL_ADDRESS=temporal:7233
command: python scripts/run_worker.py
networks:
- temporal-network
train-api:
build:
context: .
dockerfile: Dockerfile
container_name: temporal-ai-agent-train-api
depends_on:
- temporal
env_file:
- .env
environment:
- TEMPORAL_ADDRESS=temporal:7233
command: python thirdparty/train_api.py
networks:
- temporal-network
frontend:
image: node:18-alpine
container_name: temporal-ai-agent-frontend
working_dir: /app
volumes:
- ./frontend:/app
command: sh -c "apk update && apk add --no-cache xdg-utils && npm install && npx vite --host 0.0.0.0"
ports:
- "5173:5173"
depends_on:
- api
networks:
- temporal-network
networks:
temporal-network:
driver: bridge
volumes:
postgresql:

View File

@@ -93,32 +93,10 @@ temporal server start-dev
```
See the [Temporal documentation](https://learn.temporal.io/getting_started/python/dev_environment/) for other platforms.
You can also run a local Temporal server using Docker Compose. See the `Development with Docker` section below.
## Running the Application
### Docker
- All services are defined in `docker-compose.yml` (includes a Temporal server).
- **Dev overrides** (mounted code, livereload commands) live in `docker-compose.override.yml` and are **automerged** on `docker compose up`.
- To start **development** mode (with hotreload):
```bash
docker compose up -d
# quick rebuild without infra:
docker compose up -d --no-deps --build api train-api worker frontend
```
- To run **production** mode (ignore dev overrides):
```bash
docker compose -f docker-compose.yml up -d
```
Default urls:
* Temporal UI: [http://localhost:8080](http://localhost:8080)
* API: [http://localhost:8000](http://localhost:8000)
* Frontend: [http://localhost:5173](http://localhost:5173)
### Local Machine (no docker)
**Python Backend**
### Python Backend
Requires [Poetry](https://python-poetry.org/) to manage dependencies.
@@ -141,7 +119,7 @@ poetry run uvicorn api.main:app --reload
```
Access the API at `/docs` to see the available endpoints.
**React UI**
### React UI
Start the frontend:
```bash
cd frontend
@@ -149,7 +127,8 @@ npm install
npx vite
```
Access the UI at `http://localhost:5173`
## Goal-Specific Tool Configuration
Here is configuration guidance for specific goals. Travel and financial goals have configuration & setup as below.