Iā€™d like to have Prefect server running locally in...
# prefect-community
m
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.
n
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
Great, thanks! Will check it out and report back!
n
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
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 ;)
šŸ™Œ 1
b
adding this as an option would be an awesome PR
n
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.