initial base setup #1
|
|
@ -29,4 +29,7 @@ jobs:
|
|||
if docker compose -f docker-compose.dev-env.yml ps --status running 2>/dev/null | grep -q frontend; then
|
||||
curl -sf http://localhost:3097/api/health && echo "✓ DEV Frontend-Proxy /api/health OK"
|
||||
fi
|
||||
docker compose -f docker-compose.dev-env.yml exec -T backend pip install -q -r requirements-dev.txt
|
||||
docker compose -f docker-compose.dev-env.yml exec -T backend python -m pytest tests -ra -vv --tb=short
|
||||
echo "✓ DEV pytest OK"
|
||||
echo "=== Kairo DEV Deploy complete ==="
|
||||
|
|
|
|||
|
|
@ -29,4 +29,7 @@ jobs:
|
|||
if docker compose ps --status running 2>/dev/null | grep -q frontend; then
|
||||
curl -sf http://localhost:3004/api/health && echo "✓ PROD Frontend-Proxy /api/health OK"
|
||||
fi
|
||||
docker compose exec -T backend pip install -q -r requirements-dev.txt
|
||||
docker compose exec -T backend python -m pytest tests -ra -vv --tb=short
|
||||
echo "✓ PROD pytest OK"
|
||||
echo "=== Kairo PROD Deploy complete ==="
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
name: Test Suite
|
||||
|
||||
# push develop/main → compose-smoke (frischer Build auf dem Runner)
|
||||
# workflow_run nach Deploy → pytest/k6/playwright gegen laufende Instanz
|
||||
# pull_request → compose-smoke
|
||||
# push develop/main → nur lint + frontend-build (Deploy läuft separat)
|
||||
# pull_request → compose-smoke auf alternativen Ports (kein Konflikt mit kairo-dev)
|
||||
# workflow_run nach Deploy → pytest/k6/playwright gegen deployte Instanz (localhost)
|
||||
on:
|
||||
push:
|
||||
branches: [develop, main]
|
||||
|
|
@ -14,28 +14,26 @@ on:
|
|||
|
||||
jobs:
|
||||
compose-smoke:
|
||||
if: github.event_name == 'push' || github.event_name == 'pull_request'
|
||||
# Nicht bei push: Deploy nutzt dieselben Standard-Ports auf dem Pi.
|
||||
if: github.event_name == 'pull_request'
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
COMPOSE_PROJECT_NAME: kairo-ci-smoke
|
||||
DB_PASSWORD: ci_smoke_password
|
||||
KAIRO_BACKEND_PORT: 18197
|
||||
KAIRO_FRONTEND_PORT: 13197
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Compose Stack bauen und testen
|
||||
- name: Compose Stack bauen und testen (isolierte CI-Ports)
|
||||
run: |
|
||||
set -e
|
||||
if [ "${{ github.ref_name }}" = "main" ]; then
|
||||
COMPOSE="docker-compose.yml"
|
||||
API_PORT=8004
|
||||
UI_PORT=3004
|
||||
else
|
||||
COMPOSE="docker-compose.dev-env.yml"
|
||||
API_PORT=8097
|
||||
UI_PORT=3097
|
||||
fi
|
||||
API_PORT="${KAIRO_BACKEND_PORT}"
|
||||
UI_PORT="${KAIRO_FRONTEND_PORT}"
|
||||
|
||||
echo "=== Smoke: $COMPOSE ==="
|
||||
echo "=== Smoke: $COMPOSE (Projekt $COMPOSE_PROJECT_NAME, API $API_PORT) ==="
|
||||
docker compose -f "$COMPOSE" up -d --build --wait
|
||||
|
||||
curl -sf "http://localhost:${API_PORT}/api/health" | tee /tmp/health-api.json
|
||||
|
|
|
|||
|
|
@ -10,8 +10,7 @@ services:
|
|||
POSTGRES_PASSWORD: "${DB_PASSWORD:-dev_password}"
|
||||
volumes:
|
||||
- dev-kairo-db-data:/var/lib/postgresql/data
|
||||
ports:
|
||||
- "5437:5432"
|
||||
# Kein Host-Port: DB nur im Compose-Netz (vermeidet Konflikte mit kairo-dev + CI)
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${DB_USER:-kairo_dev} -d ${DB_NAME:-kairo_dev}"]
|
||||
interval: 5s
|
||||
|
|
@ -35,7 +34,7 @@ services:
|
|||
ALLOWED_ORIGINS: "${ALLOWED_ORIGINS:-https://dev.kairo.jinkendo.de,http://192.168.2.49:3097,http://localhost:3097}"
|
||||
ENVIRONMENT: "${ENVIRONMENT:-development}"
|
||||
ports:
|
||||
- "8097:8000"
|
||||
- "${KAIRO_BACKEND_PORT:-8097}:8000"
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
|
|
@ -62,7 +61,7 @@ services:
|
|||
args:
|
||||
VITE_API_URL: ""
|
||||
ports:
|
||||
- "3097:80"
|
||||
- "${KAIRO_FRONTEND_PORT:-3097}:80"
|
||||
depends_on:
|
||||
backend:
|
||||
condition: service_healthy
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ services:
|
|||
ALLOWED_ORIGINS: "${ALLOWED_ORIGINS:-https://kairo.jinkendo.de}"
|
||||
ENVIRONMENT: "${ENVIRONMENT:-production}"
|
||||
ports:
|
||||
- "8004:8000"
|
||||
- "${KAIRO_BACKEND_PORT:-8004}:8000"
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
|
|
@ -64,7 +64,7 @@ services:
|
|||
VITE_API_URL: ""
|
||||
container_name: kairo-ui
|
||||
ports:
|
||||
- "3004:80"
|
||||
- "${KAIRO_FRONTEND_PORT:-3004}:80"
|
||||
depends_on:
|
||||
backend:
|
||||
condition: service_healthy
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
| **Server-Verzeichnis** | `/home/lars/docker/kairo` | `/home/lars/docker/kairo-dev` |
|
||||
| **Frontend-Port** | 3004 | 3097 |
|
||||
| **Backend-Port** | 8004 | 8097 |
|
||||
| **PostgreSQL (localhost)** | 5436 | 5437 |
|
||||
| **PostgreSQL** | nur im Container-Netz (Prod optional localhost:5436) | nur im Container-Netz |
|
||||
| **Domain** | kairo.jinkendo.de | dev.kairo.jinkendo.de |
|
||||
|
||||
---
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user