lazyflat/docker-compose.yml
EiSiMo ebb11178e7 chore: sweep dead code across all three services
Per review §1 — verified no callers before each deletion:

- _next_scrape_utc (context dict key never read by any template)
- ALERT_SCRAPE_INTERVAL_SECONDS settings import (only _next_scrape_utc read it)
- alert/paths.py (imported by nothing)
- alert/settings.py LANGUAGE (alert doesn't use translations.toml)
- alert/main.py: the vestigial `c = {}` connectivity dict, the comment
  about re-enabling it, and the entire connectivity block in
  _flat_payload — the web-side columns stay NULL on insert now
- alert/maps.py: DESTINATIONS, calculate_score, _get_next_weekday,
  _calculate_transfers (only geocode is used in the scraper)
- alert/flat.py: connectivity + display_address properties,
  _connectivity field, unused datetime import
- apply/utils.py str_to_preview (no callers) — file removed
- web/matching.py: max_morning_commute + commute check
- web/app.py: don't pass connectivity dict into flat_matches_filter,
  don't write email_address through update_notifications
- web/db.py: get_error (no callers); drop kill_switch,
  max_morning_commute, email_address from their allowed-sets so they're
  not writable through update_* anymore
- web/settings.py + docker-compose.yml: SMTP_HOST/PORT/USERNAME/PASSWORD/
  FROM/STARTTLS (notifications.py is telegram-only now)

DB columns themselves (kill_switch, email_address, max_morning_commute,
connectivity_morning_time, connectivity_night_time) stay in the schema
— SQLite can't drop them cheaply and they're harmless.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-21 19:06:05 +02:00

64 lines
2.1 KiB
YAML

services:
web:
build: ./web
container_name: wohnungsdidi-web
restart: unless-stopped
depends_on:
apply:
condition: service_started
environment:
- AUTH_USERNAME=${AUTH_USERNAME}
- AUTH_PASSWORD_HASH=${AUTH_PASSWORD_HASH}
- SESSION_SECRET=${SESSION_SECRET}
- COOKIE_SECURE=${COOKIE_SECURE:-true}
- INTERNAL_API_KEY=${INTERNAL_API_KEY}
- APPLY_URL=http://apply:8000
- APPLY_TIMEOUT=${APPLY_TIMEOUT:-600}
- APPLY_FAILURE_THRESHOLD=${APPLY_FAILURE_THRESHOLD:-3}
- DATA_DIR=/data
- SESSION_MAX_AGE_SECONDS=${SESSION_MAX_AGE_SECONDS:-604800}
- LOGIN_RATE_LIMIT=${LOGIN_RATE_LIMIT:-5}
- LOGIN_RATE_WINDOW_SECONDS=${LOGIN_RATE_WINDOW_SECONDS:-900}
- RETENTION_DAYS=${RETENTION_DAYS:-14}
- RETENTION_RUN_INTERVAL_SECONDS=${RETENTION_RUN_INTERVAL_SECONDS:-3600}
- PUBLIC_URL=${PUBLIC_URL:-https://flat.lab.moritz.run}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-}
- ANTHROPIC_MODEL=${ANTHROPIC_MODEL:-claude-haiku-4-5-20251001}
volumes:
# Legacy volume name — kept so Coolify reuses the existing data volume
# after the rename from lazyflat → wohnungsdidi.
- lazyflat_data:/data
expose:
- "8000"
apply:
build: ./apply
container_name: wohnungsdidi-apply
restart: unless-stopped
expose:
- "8000"
environment:
- INTERNAL_API_KEY=${INTERNAL_API_KEY}
- HEADLESS=true
- BROWSER_WIDTH=${BROWSER_WIDTH:-600}
- BROWSER_HEIGHT=${BROWSER_HEIGHT:-800}
- BROWSER_LOCALE=${BROWSER_LOCALE:-de-DE}
- POST_SUBMISSION_SLEEP_MS=${POST_SUBMISSION_SLEEP_MS:-0}
alert:
build: ./alert
container_name: wohnungsdidi-alert
restart: unless-stopped
depends_on:
web:
condition: service_started
environment:
- WEB_URL=http://web:8000
- INTERNAL_API_KEY=${INTERNAL_API_KEY}
- SLEEP_INTERVALL=${SLEEP_INTERVALL:-60}
- GMAPS_API_KEY=${GMAPS_API_KEY}
- BERLIN_WOHNEN_USERNAME=${BERLIN_WOHNEN_USERNAME}
- BERLIN_WOHNEN_PASSWORD=${BERLIN_WOHNEN_PASSWORD}
volumes:
lazyflat_data: