fix: run API dev stack in dev mode

This commit is contained in:
kcar 2026-05-28 10:15:33 +01:00
parent b452c9f593
commit 7fede4d082
3 changed files with 17 additions and 4 deletions

View File

@ -25,6 +25,11 @@ services:
- .env.dev - .env.dev
environment: environment:
- REDIS_HOST=redis-dev - REDIS_HOST=redis-dev
- REDIS_DB_DEV=0
- BACKEND_DEV_MODE=true
- APP_ENV=development
- ENVIRONMENT=development
- START_MODE=dev
- RUN_INIT=false - RUN_INIT=false
- INIT_MODE=infra - INIT_MODE=infra
ports: ports:
@ -45,6 +50,10 @@ services:
- .env.dev - .env.dev
environment: environment:
- REDIS_HOST=redis-dev - REDIS_HOST=redis-dev
- REDIS_DB_DEV=0
- BACKEND_DEV_MODE=true
- APP_ENV=development
- ENVIRONMENT=development
- API_HEALTH_URL=http://192.168.0.64:18000/health - API_HEALTH_URL=http://192.168.0.64:18000/health
depends_on: depends_on:
redis-dev: redis-dev:

View File

@ -98,11 +98,13 @@ if [ "$RUN_INIT" = "true" ]; then
fi fi
fi fi
# Start the production server (unless init-only mode) # Start the server (unless init-only mode). Default remains production, but
# development Compose can set START_MODE=dev so cc-api-dev reports and uses
# development Redis/config instead of silently booting as prod.
START_MODE="${START_MODE:-prod}"
if [ "$1" != "init-only" ] && [ -z "$INIT_ONLY" ]; then if [ "$1" != "init-only" ] && [ -z "$INIT_ONLY" ]; then
print_status "Starting production server..." print_status "Starting ${START_MODE} server..."
exec ./start.sh prod exec ./start.sh "$START_MODE"
else else
print_status "Init-only mode - not starting server" print_status "Init-only mode - not starting server"
fi fi

View File

@ -40,6 +40,8 @@ def test_dev_api_health_endpoint_is_healthy():
assert payload['status'] == 'healthy' assert payload['status'] == 'healthy'
assert payload['services']['supabase']['status'] == 'healthy' assert payload['services']['supabase']['status'] == 'healthy'
assert payload['services']['redis']['status'] == 'healthy' assert payload['services']['redis']['status'] == 'healthy'
assert payload['services']['redis']['environment'] == 'dev'
assert payload['services']['redis']['database'] == 0
def test_supabase_dev_seed_core_counts(): def test_supabase_dev_seed_core_counts():