networks:
    net:
        driver: bridge

services:
    blog_creator:
        build:
            context: .
            dockerfile: Dockerfile
        container_name: blog_creator
        env_file:
            - .env
        volumes:
            - ./generated_files/:/blog_creator/generated_files
        networks:
            - net

    chroma:
        image: chromadb/chroma
        container_name: chroma
        volumes:
            # Be aware that indexed data are located in "/chroma/chroma/"
            # Default configuration for persist_directory in chromadb/config.py
            # Read more about deployments: https://docs.trychroma.com/deployment
            - chroma-data:/chroma/chroma
        #command: "--host 0.0.0.0 --port 8000 --proxy-headers --log-config chromadb/log_config.yml --timeout-keep-alive 30"
        environment:
            - IS_PERSISTENT=TRUE
        restart: unless-stopped # possible values are: "no", always", "on-failure", "unless-stopped"
        ports:
            - "8000:8000"
        healthcheck:
            # Adjust below to match your container port
            test:
                ["CMD", "curl", "-f", "http://localhost:8000/api/v2/heartbeat"]
            interval: 30s
            timeout: 10s
            retries: 3
        networks:
            - net

volumes:
    chroma-data:
        driver: local