Add configurable scheduling, UI health/task indicators, and auto-load map with default filters
This commit is contained in:
parent
1c8c3e4657
commit
c7ac448f15
18 changed files with 2287 additions and 656 deletions
105
crawler/docker-compose.yml
Normal file
105
crawler/docker-compose.yml
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
version: "3.8"
|
||||
|
||||
services:
|
||||
redis:
|
||||
image: redis:8
|
||||
container_name: rec-redis
|
||||
ports:
|
||||
- "6379:6379"
|
||||
volumes:
|
||||
- redis_data:/data
|
||||
command: ["redis-server", "--appendonly", "yes"]
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "ping"]
|
||||
interval: 5s
|
||||
timeout: 3s
|
||||
retries: 5
|
||||
|
||||
mysql:
|
||||
image: mysql:9
|
||||
container_name: rec-mysql
|
||||
ports:
|
||||
- "3306:3306"
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: rootpass
|
||||
MYSQL_DATABASE: wrongmove
|
||||
MYSQL_USER: wrongmove
|
||||
MYSQL_PASSWORD: wrongmove
|
||||
volumes:
|
||||
- mysql_data:/var/lib/mysql
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
app:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: rec-app
|
||||
ports:
|
||||
- "5001:5001"
|
||||
volumes:
|
||||
# Bind mount source code for development
|
||||
- .:/app
|
||||
# Preserve virtual environment in container
|
||||
- app_venv:/app/.venv
|
||||
environment:
|
||||
- ENV=dev
|
||||
- DB_CONNECTION_STRING=mysql://wrongmove:wrongmove@mysql:3306/wrongmove
|
||||
- CELERY_BROKER_URL=redis://redis:6379/0
|
||||
- CELERY_RESULT_BACKEND=redis://redis:6379/0
|
||||
- ROUTING_API_KEY=${ROUTING_API_KEY:-}
|
||||
depends_on:
|
||||
redis:
|
||||
condition: service_healthy
|
||||
mysql:
|
||||
condition: service_healthy
|
||||
command: ["uvicorn", "api.app:app", "--host", "0.0.0.0", "--port", "5001", "--reload", "--reload-dir", "api", "--reload-dir", "services", "--reload-dir", "repositories", "--reload-dir", "models"]
|
||||
|
||||
celery:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: rec-celery
|
||||
volumes:
|
||||
- .:/app
|
||||
- app_venv:/app/.venv
|
||||
environment:
|
||||
- ENV=dev
|
||||
- DB_CONNECTION_STRING=mysql://wrongmove:wrongmove@mysql:3306/wrongmove
|
||||
- CELERY_BROKER_URL=redis://redis:6379/0
|
||||
- CELERY_RESULT_BACKEND=redis://redis:6379/0
|
||||
- ROUTING_API_KEY=${ROUTING_API_KEY:-}
|
||||
- SCRAPE_SCHEDULES=${SCRAPE_SCHEDULES:-}
|
||||
depends_on:
|
||||
redis:
|
||||
condition: service_healthy
|
||||
mysql:
|
||||
condition: service_healthy
|
||||
command: ["celery", "-A", "celery_app", "worker", "--loglevel=info"]
|
||||
|
||||
celery-beat:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: rec-celery-beat
|
||||
volumes:
|
||||
- .:/app
|
||||
- app_venv:/app/.venv
|
||||
environment:
|
||||
- ENV=dev
|
||||
- DB_CONNECTION_STRING=mysql://wrongmove:wrongmove@mysql:3306/wrongmove
|
||||
- CELERY_BROKER_URL=redis://redis:6379/0
|
||||
- CELERY_RESULT_BACKEND=redis://redis:6379/0
|
||||
- SCRAPE_SCHEDULES=${SCRAPE_SCHEDULES:-}
|
||||
depends_on:
|
||||
- redis
|
||||
- celery
|
||||
command: ["celery", "-A", "celery_app", "beat", "--loglevel=info"]
|
||||
|
||||
volumes:
|
||||
redis_data:
|
||||
mysql_data:
|
||||
app_venv:
|
||||
Loading…
Add table
Add a link
Reference in a new issue