# Builds the image from source (development). Used instead of docker-compose.yaml when # COMPOSE_FILE=docker-compose.build.yaml is set in .env, or with -f docker-compose.build.yaml. services: whattodo: build: context: . target: runtime image: whattodo:latest restart: unless-stopped env_file: .env ports: # BIND_ADDR=127.0.0.1 -> this computer only; 0.0.0.0 -> also reachable from your phone on the LAN. - "${BIND_ADDR:-127.0.0.1}:${PORT:-8080}:8000" volumes: - ./data:/data healthcheck: test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/api/health')"] interval: 30s timeout: 5s retries: 3 test: build: context: . target: test profiles: ["test"]