Thread
#prefect-community
    m

    Matthias

    2 years ago
    Iā€™d like to have Prefect server running locally in an existing Docker environment. Is there any way I could spin up the containers created by
    prefect server start
    manually? Or is there a way to run
    prefect server start
    inside another Docker container? I tried to add the Docker socket as a volume but that did not work.
    nicholas

    nicholas

    2 years ago
    Hi @Matthias! Yes that's possible, if you have an editable install of Prefect (by cloning the repo and running
    pip install -e .
    ), you can manually run any of the images or the
    docker-compose.yml
    at your discretion. You can find the docker-compose file under the docker directory of server and the individual images under their respective directories.
    For adding it to an existing docker network, I imagine you can re-use some of the docker-compose file
    m

    Matthias

    2 years ago
    Great, thanks! Will check it out and report back!
    nicholas

    nicholas

    2 years ago
    Sounds good! I also just realized you don't need the editable install, you'll just need the repo šŸ™‚
    Though perhaps with the editable install you could just modify the docker-compose file in-place and add it to your existing docker network, I haven't test this though so curious to hear how it goes!
    m

    Matthias

    2 years ago
    I managed to get the prefect UI up and running on docker using the docker-compose file. Now: How can I tell the agent to connect to the right container? I am lacking some understanding on how the agent works and how/where I should have it running @nicholas
    I got it! Just adapt the config file šŸ˜‰
    b

    Bob Colner

    2 years ago
    adding this as an option would be an awesome PR
    nicholas

    nicholas

    2 years ago
    Sorry @Matthias, was out for the weekend, glad you got it sorted! @Bob Colner - what do you mean by an option? It seems that the
    config.toml
    functions as a central place for all options but am curious what you had in mind.