mirror of
https://github.com/OpenStaticFish/MicroServices.git
synced 2026-10-13 06:35:12 +00:00
Add site analyzer service
This commit is contained in:
@@ -22,8 +22,10 @@ allow_k8s_contexts('kind-openstaticfish')
|
||||
# --- Scraper Service ---
|
||||
# Builds the Docker image and deploys the manifest with live reload
|
||||
docker_build('scraper', './services/scraper')
|
||||
docker_build('site-analyzer', './services/site-analyzer')
|
||||
|
||||
k8s_yaml('./k8s/scraper.yaml')
|
||||
k8s_yaml('./k8s/site-analyzer.yaml')
|
||||
|
||||
local_resource(
|
||||
'webshare-secret',
|
||||
@@ -39,6 +41,12 @@ k8s_resource(
|
||||
labels=['scraper'],
|
||||
)
|
||||
|
||||
k8s_resource(
|
||||
workload='site-analyzer-deployment',
|
||||
port_forwards='8090:8090',
|
||||
labels=['site-analyzer'],
|
||||
)
|
||||
|
||||
# --- Local Resources ---
|
||||
# Run a simple health check as a local resource
|
||||
local_resource(
|
||||
@@ -47,3 +55,10 @@ local_resource(
|
||||
resource_deps=['scraper-deployment'],
|
||||
labels=['utility'],
|
||||
)
|
||||
|
||||
local_resource(
|
||||
'site-analyzer-health-check',
|
||||
cmd='curl -sf http://localhost:8090/health || echo "Site analyzer not ready"',
|
||||
resource_deps=['site-analyzer-deployment'],
|
||||
labels=['utility'],
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user