Skip to content

Commit 0b12acd

Browse files
author
Davidson Gomes
committed
Merge branch 'release/0.0.10'
2 parents 17d7223 + a338817 commit 0b12acd

File tree

6 files changed

+188
-94
lines changed

6 files changed

+188
-94
lines changed

.env.example

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,22 @@ JWT_EXPIRATION_TIME=3600
3434
# Encryption key for API keys
3535
ENCRYPTION_KEY="your-encryption-key"
3636

37+
# Email provider settings
38+
EMAIL_PROVIDER="sendgrid"
39+
3740
# SendGrid
3841
SENDGRID_API_KEY="your-sendgrid-api-key"
3942
EMAIL_FROM="noreply@yourdomain.com"
43+
44+
# SMTP settings
45+
SMTP_HOST="your-smtp-host"
46+
SMTP_FROM="noreply-smtp@yourdomain.com"
47+
SMTP_USER="your-smtp-username"
48+
SMTP_PASSWORD="your-smtp-password"
49+
SMTP_PORT=587
50+
SMTP_USE_TLS=true
51+
SMTP_USE_SSL=false
52+
4053
APP_URL="https://yourdomain.com"
4154

4255
LANGFUSE_PUBLIC_KEY="your-langfuse-public-key"

.github/workflows/docker-image.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ on:
77
branches: ["main", "develop"]
88

99
env:
10-
REGISTRY: ghcr.io
10+
GHCR_REGISTRY: ghcr.io
11+
DOCKERHUB_REGISTRY: docker.io
1112
IMAGE_NAME: ${{ github.repository }}
13+
DOCKERHUB_IMAGE: ${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}
1214

1315
jobs:
1416
build-and-push:
@@ -21,18 +23,27 @@ jobs:
2123
- name: Checkout repository
2224
uses: actions/checkout@v4
2325

24-
- name: Log in to the Container registry
26+
- name: Log in to GitHub Container Registry
2527
uses: docker/login-action@v3
2628
with:
27-
registry: ${{ env.REGISTRY }}
29+
registry: ${{ env.GHCR_REGISTRY }}
2830
username: ${{ github.actor }}
2931
password: ${{ secrets.GITHUB_TOKEN }}
32+
33+
- name: Log in to Docker Hub
34+
uses: docker/login-action@v3
35+
with:
36+
registry: ${{ env.DOCKERHUB_REGISTRY }}
37+
username: ${{ secrets.DOCKERHUB_USERNAME }}
38+
password: ${{ secrets.DOCKERHUB_TOKEN }}
3039

31-
- name: Extract metadata (tags, labels) for Docker
40+
- name: Extract metadata for Docker
3241
id: meta
3342
uses: docker/metadata-action@v5
3443
with:
35-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
44+
images: |
45+
${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}
46+
${{ env.DOCKERHUB_REGISTRY }}/${{ env.DOCKERHUB_IMAGE }}
3647
tags: |
3748
type=raw,value=develop,enable=${{ github.ref == format('refs/heads/{0}', 'develop') }}
3849
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
- Improve context management in agent execution
1414
- Add file support for A2A protocol (Agent-to-Agent) endpoints
1515
- Implement multimodal content processing in A2A messages
16+
- Add SMTP email provider support as alternative to SendGrid
1617

1718
## [0.0.9] - 2025-05-13
1819

README.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ Authorization: Bearer your-token-jwt
331331
- **Uvicorn**: ASGI server
332332
- **Redis**: Cache and session management
333333
- **JWT**: Secure token authentication
334-
- **SendGrid**: Email service for notifications
334+
- **SendGrid/SMTP**: Email service for notifications (configurable)
335335
- **Jinja2**: Template engine for email rendering
336336
- **Bcrypt**: Password hashing and security
337337
- **LangGraph**: Framework for building stateful, multi-agent workflows
@@ -469,7 +469,9 @@ You'll also need the following accounts/API keys:
469469
- Python 3.10+
470470
- PostgreSQL
471471
- Redis
472-
- SendGrid Account (for email sending)
472+
- Email provider:
473+
- SendGrid Account (if using SendGrid email provider)
474+
- SMTP Server (if using SMTP email provider)
473475

474476
## 🔧 Installation
475477

@@ -566,11 +568,23 @@ JWT_SECRET_KEY="your-jwt-secret-key"
566568
JWT_ALGORITHM="HS256"
567569
JWT_EXPIRATION_TIME=30 # In seconds
568570

569-
# SendGrid for emails
571+
# Email provider configuration
572+
EMAIL_PROVIDER="sendgrid" # Options: "sendgrid" or "smtp"
573+
574+
# SendGrid (if EMAIL_PROVIDER=sendgrid)
570575
SENDGRID_API_KEY="your-sendgrid-api-key"
571576
EMAIL_FROM="noreply@yourdomain.com"
572577
APP_URL="https://yourdomain.com"
573578

579+
# SMTP (if EMAIL_PROVIDER=smtp)
580+
SMTP_FROM="noreply-smtp@yourdomain.com"
581+
SMTP_USER="your-smtp-username"
582+
SMTP_PASSWORD="your-smtp-password"
583+
SMTP_HOST="your-smtp-host"
584+
SMTP_PORT=587
585+
SMTP_USE_TLS=true
586+
SMTP_USE_SSL=false
587+
574588
# Encryption for API keys
575589
ENCRYPTION_KEY="your-encryption-key"
576590
```
@@ -787,8 +801,12 @@ The main environment variables used by the API container:
787801
- `POSTGRES_CONNECTION_STRING`: PostgreSQL connection string
788802
- `REDIS_HOST`: Redis host (use "redis" when running with Docker)
789803
- `JWT_SECRET_KEY`: Secret key for JWT token generation
790-
- `SENDGRID_API_KEY`: SendGrid API key for sending emails
791-
- `EMAIL_FROM`: Email used as sender
804+
- `EMAIL_PROVIDER`: Email provider to use ("sendgrid" or "smtp")
805+
- `SENDGRID_API_KEY`: SendGrid API key (if using SendGrid)
806+
- `EMAIL_FROM`: Email used as sender (for SendGrid)
807+
- `SMTP_FROM`: Email used as sender (for SMTP)
808+
- `SMTP_HOST`, `SMTP_PORT`, `SMTP_USER`, `SMTP_PASSWORD`: SMTP server configuration
809+
- `SMTP_USE_TLS`, `SMTP_USE_SSL`: SMTP security settings
792810
- `APP_URL`: Base URL of the application
793811

794812
## 🔒 Secure API Key Management

src/config/settings.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,22 @@ class Settings(BaseSettings):
8181
# Encryption settings
8282
ENCRYPTION_KEY: str = os.getenv("ENCRYPTION_KEY", secrets.token_urlsafe(32))
8383

84+
# Email provider settings
85+
EMAIL_PROVIDER: str = os.getenv("EMAIL_PROVIDER", "sendgrid")
86+
8487
# SendGrid settings
8588
SENDGRID_API_KEY: str = os.getenv("SENDGRID_API_KEY", "")
8689
EMAIL_FROM: str = os.getenv("EMAIL_FROM", "noreply@yourdomain.com")
90+
91+
# SMTP settings
92+
SMTP_HOST: str = os.getenv("SMTP_HOST", "")
93+
SMTP_PORT: int = int(os.getenv("SMTP_PORT", 587))
94+
SMTP_USER: str = os.getenv("SMTP_USER", "")
95+
SMTP_PASSWORD: str = os.getenv("SMTP_PASSWORD", "")
96+
SMTP_USE_TLS: bool = os.getenv("SMTP_USE_TLS", "true").lower() == "true"
97+
SMTP_USE_SSL: bool = os.getenv("SMTP_USE_SSL", "false").lower() == "true"
98+
SMTP_FROM: str = os.getenv("SMTP_FROM", "")
99+
87100
APP_URL: str = os.getenv("APP_URL", "http://localhost:8000")
88101

89102
# Server settings

0 commit comments

Comments
 (0)