services: backend: build: ./backend ports: - "8000:8000" volumes: - ./data:/app/data environment: - DATABASE_URL=sqlite:////app/data/btc_portfolio.db - SECRET_KEY=${SECRET_KEY:-dev-insecure-key-change-me} restart: unless-stopped healthcheck: test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/')"] interval: 30s timeout: 10s retries: 3 start_period: 15s frontend: build: context: ./frontend args: - REACT_APP_API_URL=http://localhost:8000 ports: - "3001:3001" depends_on: - backend restart: unless-stopped healthcheck: test: ["CMD", "wget", "-qO-", "http://localhost:3001/"] interval: 30s timeout: 10s retries: 3 start_period: 20s