39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
services:
|
|
web:
|
|
build: .
|
|
ports:
|
|
- "8000:8000"
|
|
environment:
|
|
DATABASE_PATH: /data/what2do.db
|
|
PUBLIC_BASE_URL: http://localhost:8000
|
|
CRAWL_INTERVAL_MINUTES: "60"
|
|
NOMINATIM_USER_AGENT: what2do-local/0.1 (set-a-contact@example.com)
|
|
volumes:
|
|
- what2do-data:/data
|
|
restart: unless-stopped
|
|
|
|
test:
|
|
build: .
|
|
working_dir: /app
|
|
command: ["sh", "-c", "pip install --no-cache-dir pytest==8.4.2 pytest-cov==6.2.1 && python -m pytest tests/unit -vv -rA --tb=short --cov=app --cov-report=term-missing --results-file=/test-results/latest.txt"]
|
|
volumes:
|
|
- ./test-results:/test-results
|
|
- ./tests/fixtures/source_cache:/app/tests/fixtures/source_cache
|
|
environment:
|
|
DATABASE_PATH: /tmp/what2do-test.db
|
|
PYTHONPATH: /app
|
|
profiles: ["test"]
|
|
|
|
cache-sources:
|
|
build: .
|
|
working_dir: /app
|
|
command: ["python", "scripts/cache_source_documents.py", "--delay", "2"]
|
|
volumes:
|
|
- ./tests/fixtures/source_cache:/app/tests/fixtures/source_cache
|
|
environment:
|
|
PYTHONPATH: /app
|
|
profiles: ["test"]
|
|
|
|
volumes:
|
|
what2do-data:
|