Skip to content

Commit bcd6b7e

Browse files
committed
Finalize backend architecture: update CI, requirements, and Docker orchestration for production readiness
1 parent 4f1210e commit bcd6b7e

4 files changed

Lines changed: 38 additions & 52 deletions

File tree

.env.example

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
# Core API Keys
22
OPENAI_API_KEY=your_openai_api_key_here
33

4-
# Qdrant Vector Store (Deprecated in favor of Chroma Cloud)
5-
QDRANT_URL=http://localhost:6333
6-
QDRANT_API_KEY=your_qdrant_api_key_here
7-
84
# Chroma Cloud
95
CHROMA_HOST=api.trychroma.com
106
CHROMA_API_KEY=your_chroma_api_key_here
@@ -17,9 +13,6 @@ REDIS_HOST=localhost
1713
REDIS_PORT=6379
1814
SEMANTIC_CACHE_THRESHOLD=0.85
1915

20-
# Observability (Optional - Arize Phoenix)
21-
PHOENIX_COLLECTOR_ENDPOINT=http://localhost:6006
22-
2316
# Application Settings
2417
LOG_LEVEL=INFO
2518
DATA_DIR=./data

.github/workflows/ci.yml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,36 +2,36 @@ name: Project Aether CI
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main]
88

99
jobs:
1010
test:
1111
runs-on: ubuntu-latest
12-
12+
1313
steps:
14-
- uses: actions/checkout@v4
15-
16-
- name: Set up Python 3.11
17-
uses: actions/setup-python@v5
18-
with:
19-
python-version: "3.11"
20-
21-
- name: Install dependencies
22-
run: |
23-
python -m pip install --upgrade pip
24-
pip install -r requirements.txt
25-
26-
- name: Run tests with pytest
27-
env:
28-
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
29-
REDIS_HOST: localhost
30-
REDIS_PORT: 6379
31-
QDRANT_URL: http://localhost:6333
32-
LOG_LEVEL: INFO
33-
DATA_DIR: ./tests/data
34-
run: |
35-
# Run tests, excluding integration style if no services are running
36-
# But our unit tests should all be mocked correctly
37-
pytest tests/
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.11"
20+
cache: "pip"
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install -r requirements.txt
26+
27+
- name: Lint
28+
run: |
29+
pip install ruff
30+
ruff check .
31+
32+
- name: Run tests
33+
env:
34+
LOG_LEVEL: INFO
35+
DATA_DIR: ./tests/data
36+
run: |
37+
pytest -m "not integration"

docker-compose.yml

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,42 @@
11
services:
22
api:
33
build: .
4+
command: uvicorn src.api.app:app --host 0.0.0.0 --port 8000
45
ports:
56
- "8000:8000"
67
env_file:
78
- .env
8-
environment:
9-
- REDIS_HOST=redis
10-
- DATABASE_URL=postgresql://user:password@postgres:5432/aether
119
depends_on:
1210
- redis
1311
- postgres
1412
volumes:
15-
- ./data:/app/data
13+
- .:/app
1614

1715
worker:
1816
build: .
1917
command: python -m src.worker
18+
restart: always
2019
env_file:
2120
- .env
22-
environment:
23-
- REDIS_HOST=redis
24-
- DATABASE_URL=postgresql://user:password@postgres:5432/aether
2521
depends_on:
2622
- redis
2723
- postgres
2824
volumes:
29-
- ./data:/app/data
25+
- .:/app
3026

3127
redis:
3228
image: redis:7-alpine
33-
ports:
34-
- "6379:6379"
3529

3630
postgres:
3731
image: postgres:15-alpine
38-
environment:
39-
POSTGRES_DB: aether
40-
POSTGRES_USER: user
41-
POSTGRES_PASSWORD: password
42-
ports:
43-
- "5432:5432"
32+
env_file:
33+
- .env
4434
volumes:
4535
- postgres_data:/var/lib/postgresql/data
36+
healthcheck:
37+
test: ["CMD-SHELL", "pg_isready -U user"]
38+
interval: 5s
39+
retries: 5
4640

4741
volumes:
48-
postgres_data:
42+
postgres_data:

requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ pydantic>=2.0
1616
pydantic-settings
1717
python-dotenv
1818
tiktoken
19-
arize-phoenix
2019
sentence-transformers
2120
FlagEmbedding
2221
tenacity

0 commit comments

Comments
 (0)