version: "3.8" services: redis: container_name: redis_demo image: redis:7.2.4-alpine3.19 ports: - '6380:6379' healthcheck: test: [ "CMD", "redis-cli","ping" ] interval: 10s timeout: 5s retries: 5 app: container_name: flask_demo build: context: . ports: - 8080:5000 depends_on: redis: condition: service_healthy restart: always volumes: - ./flask_demo_api:/usr/src/flask-demo-api/flask_demo_api command: /bin/bash -c 'poetry run python flask_demo_api/main.py'