Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
57e254b
Employed the next phase of the ML service to try to pull from the res…
the-icemann May 14, 2026
329d508
Ideally the final build for all integrated changes in conjungtion wit…
the-icemann May 14, 2026
073cc2e
Modded the NGINX file to test core functionality dynamically
the-icemann May 15, 2026
33a4b18
Fully integrated the recommendation service to interact with the fron…
the-icemann May 16, 2026
30e6cac
Full report for the service
the-icemann May 16, 2026
4c046bf
Renderred all ML price compositions basing on user roles into the fro…
the-icemann May 18, 2026
a6da0e0
Allow CloudFront origins in CORS policy
the-icemann May 19, 2026
8678386
Removed local IP address as root logger and allowed all addressing sc…
the-icemann May 19, 2026
8206bf8
Workaround for cloudfront serving
the-icemann May 19, 2026
d7f2341
Fix CORS preflight: add headers inside OPTIONS handler
the-icemann May 19, 2026
d4e9571
Fix nginx: remove add_header from server-level if block
the-icemann May 19, 2026
97f07ac
feat: make quantity_kg optional in location service for specialty-onl…
the-icemann May 19, 2026
1ef5ec8
feat: make messaging role-agnostic — any user can initiate with any o…
the-icemann May 19, 2026
72893b6
feat: notify recipient when any conversation is initiated (all roles)
the-icemann May 19, 2026
c9f37a2
fix: sync new users to ML feature store immediately on registration
the-icemann May 19, 2026
36eae3d
fix: exclude requesting user from their own recommendations
the-icemann May 19, 2026
a3ddb5b
feat: add EC2 API origin and per-service cache behaviors to CloudFront
the-icemann May 19, 2026
ce11d04
feat: notify farmer when buyer is interested but no listings exist
the-icemann May 20, 2026
0d0a951
fix: decouple fill-envs from seed; add NOTIFICATION_SERVICE_URL to pr…
the-icemann May 20, 2026
2d9c3d2
fix: resolve service startup failures on local docker compose up
the-icemann May 20, 2026
891c8ac
fix: wire up Google Sign-In and fix auth route serving
the-icemann May 20, 2026
fcf9c97
infra: remove secret version resources from Terraform
the-icemann May 21, 2026
a3c8e35
infra: wire up soko-ug.com domain with ACM + CloudFront + Route 53
the-icemann May 21, 2026
6be27a4
fixed dns resolution in Route 53 to map domain as soko-ug.com
the-icemann May 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 22 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,23 @@ jobs:

- uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"

- name: Install ruff
run: pip install ruff

- name: Lint all services
run: |
ruff check services/auth/app \
services/farmer/app \
services/buyer/app \
services/produce/app \
services/recommendation/app
ruff check \
services/auth/app \
services/user/app \
services/produce/app \
services/order/app \
services/payment/app \
services/notification/app \
services/message/app \
services/blog/app \
services/ussd/app

integration-tests:
name: Integration Tests
Expand All @@ -36,33 +41,36 @@ jobs:
steps:
- uses: actions/checkout@v4

# CI uses dev defaults — no real secrets needed
- name: Create bridge network for ML stack
run: docker network create soko-ml-bridge || true

- name: Build and start services
run: docker compose up --build -d
timeout-minutes: 10
timeout-minutes: 15

- name: Wait for all services to be healthy
- name: Wait for all core services to be healthy
run: |
echo "Waiting for all 5 services to respond..."
for port in 8001 8002 8003 8004 8005; do
echo "Waiting for core services..."
for port in 8001 8002 8003 8004 8005 8007 8008 8009; do
for i in $(seq 1 40); do
if curl -sf http://localhost:${port}/health > /dev/null 2>&1; then
echo "Port ${port} is up."
echo " :${port} up"
break
fi
if [ "$i" = "40" ]; then
echo "Timed out waiting for port ${port}"
echo " :${port} timed out"
docker compose logs
exit 1
fi
echo "Port ${port} not ready, attempt $i — waiting 5s..."
sleep 5
done
done
echo "All services ready."

- uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"

- name: Install test dependencies
run: pip install -r tests/integration/requirements.txt
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Deploy to Production

on:
push:
branches: [main, price_prediction_service]
workflow_dispatch: # allow manual trigger from GitHub UI

concurrency:
group: deploy-prod
cancel-in-progress: false # never cancel a running deploy

jobs:
deploy:
name: Deploy Backend
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Deploy via SSH
uses: appleboy/ssh-action@v1.2.0
with:
host: ${{ secrets.EC2_HOST }}
username: ubuntu
key: ${{ secrets.EC2_SSH_KEY }}
timeout: 600s
script: |
set -e

echo "=== Pulling latest code ==="
cd /opt/soko
git fetch origin
git reset --hard origin/${{ github.ref_name }}

echo "=== Refreshing secrets ==="
bash scripts/fetch-secrets.sh
bash scripts/fetch-ml-secrets.sh

echo "=== Restarting core platform ==="
docker compose pull --ignore-pull-failures 2>/dev/null || true
docker compose up -d --build --remove-orphans

echo "=== Restarting ML stack ==="
cd services/soko-ml
docker compose up -d --build --remove-orphans

echo "=== Pruning unused images ==="
docker image prune -f

echo "=== Verifying health ==="
sleep 15
for port in 8001 8002 8003 8004 8005 8007 8008 8009; do
status=$(curl -sf --max-time 5 http://localhost:${port}/health | jq -r '.status' 2>/dev/null || echo "unreachable")
echo "Service :${port} -> ${status}"
done

- name: Notify on failure
if: failure()
run: |
echo "::error::Deployment failed — check SSH logs above"
# Add Slack/email notification here if desired
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,10 @@ erl_crash.dump

# Claude Code
.claude/

# Terraform
infrastructure/.terraform/
infrastructure/terraform.tfvars
infrastructure/*.tfstate
infrastructure/*.tfstate.backup
infrastructure/.terraform.lock.hcl
207 changes: 0 additions & 207 deletions CONTRACTS.md

This file was deleted.

Loading
Loading