https://prefect.io logo
Title
m

Matthias

05/06/2020, 10:13 PM
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

nicholas

05/06/2020, 10:18 PM
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

05/06/2020, 10:20 PM
Great, thanks! Will check it out and report back!
n

nicholas

05/06/2020, 10:21 PM
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

05/07/2020, 9:48 AM
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

Bob Colner

05/11/2020, 6:30 PM
adding this as an option would be an awesome PR
n

nicholas

05/12/2020, 12:46 PM
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.