Stelle den Frontend-MVP und die v0.3-API auf develop bereit, damit Dev API und PWA zusammen deployen.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
827e6a2a11
commit
b276758ee1
152 files changed
+25846
-34
No files matched your search
+10
-7
@@ -3,13 +3,14 @@ set -e
|
||||
|
||||
APP_DIR="${APP_DIR:-$HOME/docker/buyingagent-dev}"
|
||||
COMPOSE_FILE="${COMPOSE_FILE:-docker-compose.dev-env.yml}"
|
||||
BACKEND_DIR="${APP_DIR}/backend"
|
||||
|
||||
echo "pytest uses Dev Postgres (${APP_DIR})"
|
||||
cd "$APP_DIR"
|
||||
|
||||
i=1
|
||||
while [ "$i" -le 60 ]; do
|
||||
if [ -f "$APP_DIR/pyproject.toml" ] \
|
||||
if [ -f "$BACKEND_DIR/pyproject.toml" ] \
|
||||
&& grep -q "api-test:" "$COMPOSE_FILE" \
|
||||
&& docker compose -f "$COMPOSE_FILE" exec -T api true >/dev/null 2>&1; then
|
||||
echo "api and test profile ready (attempt $i)"
|
||||
@@ -18,7 +19,7 @@ while [ "$i" -le 60 ]; do
|
||||
if [ "$i" -eq 60 ]; then
|
||||
echo "timeout waiting for Dev checkout/api"
|
||||
docker compose -f "$COMPOSE_FILE" ps || true
|
||||
ls -la "$APP_DIR" || true
|
||||
ls -la "$APP_DIR" "$BACKEND_DIR" || true
|
||||
exit 1
|
||||
fi
|
||||
i=$((i + 1))
|
||||
@@ -44,18 +45,20 @@ docker compose -f "$COMPOSE_FILE" --profile test build --pull=false api-test
|
||||
|
||||
docker compose -f "$COMPOSE_FILE" --profile test run --rm --no-deps \
|
||||
-v "${APP_DIR}:/src:ro" \
|
||||
-w /src \
|
||||
-e PYTHONPATH=/src \
|
||||
-w /src/backend \
|
||||
-e PYTHONPATH=/src/backend \
|
||||
-e DB_NAME=buyingagent_test \
|
||||
-e ENVIRONMENT=test \
|
||||
-e ENGINE_BUILD=test \
|
||||
-e CLOCK_NOW=2026-10-03T12:00:00Z \
|
||||
api-test /app/.venv/bin/alembic upgrade head
|
||||
|
||||
docker compose -f "$COMPOSE_FILE" --profile test run --rm --no-deps \
|
||||
-v "${APP_DIR}:/src:ro" \
|
||||
-w /src \
|
||||
-e PYTHONPATH=/src \
|
||||
-w /src/backend \
|
||||
-e PYTHONPATH=/src/backend \
|
||||
-e DB_NAME=buyingagent_test \
|
||||
-e ENVIRONMENT=test \
|
||||
-e ENGINE_BUILD=test \
|
||||
api-test /app/.venv/bin/pytest tests -ra --tb=short
|
||||
-e CLOCK_NOW=2026-10-03T12:00:00Z \
|
||||
api-test /app/.venv/bin/pytest tests -m "not slow" -ra --tb=short
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
echo "=== BuyingAgent API startup ==="
|
||||
alembic upgrade head
|
||||
echo "=== starting uvicorn ==="
|
||||
exec uvicorn app.main:app --host 0.0.0.0 --port 8000
|
||||
Reference in new issue
Block a user