Skip to content

Configuration

AppStoreCat is configured through environment variables and a central configuration file. All configuration lives in the server service.

The backend .env file (server/.env) controls core settings. Copy from the example file:

Terminal window
cp server/.env.example server/.env
VariableDefaultDescription
APP_ENVlocalEnvironment: local, production
APP_DEBUGtrueEnable debug mode
APP_URLhttp://localhost:7460Backend API URL
FRONTEND_URLhttp://localhost:7461Frontend URL (for CORS)
VariableDefaultDescription
DB_HOSTappstorecat-mysqlMySQL host (Docker service name)
DB_PORT3306MySQL port
DB_DATABASEappstorecatDatabase name
DB_USERNAMEsailDatabase user
DB_PASSWORDpasswordDatabase password
VariableDefaultDescription
APPSTORE_API_URLhttp://host.docker.internal:7462App Store scraper URL
GPLAY_API_URLhttp://host.docker.internal:7463Google Play scraper URL
VariableDefaultDescription
QUEUE_CONNECTIONredisQueue driver: redis (development), database (production)
CACHE_STOREredisCache driver
REDIS_HOSTappstorecat-redisRedis host

The main configuration file is server/config/appstorecat.php. Settings are grouped into 4 sections:

Control how the backend talks to the scraper microservices:

VariableDefaultDescription
APPSTORE_TIMEOUT30App Store scraper request timeout (seconds)
GPLAY_TIMEOUT30Google Play scraper request timeout (seconds)
APPSTORE_THROTTLE_SYNC_JOBS5Max iOS sync jobs per minute
GPLAY_THROTTLE_SYNC_JOBS5Max Android sync jobs per minute
APPSTORE_THROTTLE_CHART_JOBS24Max iOS chart jobs per minute
GPLAY_THROTTLE_CHART_JOBS37Max Android chart jobs per minute

Control automatic app sync per platform:

VariableDefaultDescription
SYNC_IOS_TRACKED_ENABLEDtrueEnable scheduled iOS sync
SYNC_IOS_TRACKED_REFRESH_HOURS24iOS staleness window (hours)
SYNC_IOS_TRACKED_BATCH_SIZE5Max iOS apps dispatched per 20-minute tick
SYNC_ANDROID_TRACKED_ENABLEDtrueEnable scheduled Android sync
SYNC_ANDROID_TRACKED_REFRESH_HOURS24Android staleness window (hours)
SYNC_ANDROID_TRACKED_BATCH_SIZE5Max Android apps dispatched per 20-minute tick

The sync pipeline runs in phases and is tracked via the sync_statuses table: identity → listings → metrics → finalize → reconciling. Failed items are picked up and retried by ReconcileFailedItemsJob.

Control daily trending chart sync:

VariableDefaultDescription
CHART_IOS_DAILY_SYNC_ENABLEDtrueEnable daily iOS chart sync
CHART_ANDROID_DAILY_SYNC_ENABLEDtrueEnable daily Android chart sync

Control which actions can discover (create) new apps in the database. Each source can be toggled per platform via DISCOVER_{IOS,ANDROID}_ON_{SOURCE} environment variables:

SourceDefaultDescription
on_searchtrueApps found via store search
on_trendingtrueApps found in trending charts
on_publisher_appstrueApps found via the publisher’s app list
on_registertrueApps registered directly by users
on_importtrueApps imported via publisher import
on_similartrueApps found via similar apps
on_categorytrueApps found in category listings
on_direct_visitfalseApps visited directly by external ID — when off, unknown app URLs return 404
on_unknowntrueApps from unknown sources

The root docker-compose.yml uses these port variables (set in the root .env file):

VariableDefaultService
BACKEND_PORT7460Laravel API
FRONTEND_PORT7461React web
APPSTORE_API_PORT7462App Store scraper
GPLAY_API_PORT7463Google Play scraper
FORWARD_DB_PORT7464MySQL (host-side, container is :3306)
FORWARD_REDIS_PORT7465Redis (host-side, container is :6379)