Hello all, I have been reading about github storag...
# ask-community
m
Hello all, I have been reading about github storage and had a few questions regarding it's use: currently we use docker images that we build with docker-compose and have a minimal task to create, start, and gather the logs. This has the disadvantage of not having logs in the Prefect UI and I was investigating github storage as a way to allow us to have logs in the UI. My question is, with using the github storage, what is the minimum that I need in the flow.py file for it to pull down the actual flow from github? And does it automatically create tasks based off of the tasks contained in the flow stored in github? I am trying to wrap my head around how it works and appreciate any advice and guidance with this
k
Hi @Matthew Blau! I am honestly not sure that this will fix your logger issues. I know you’ve asked about the Docker logs a couple time. You don’t need anything special in the flow.py. You agent must have the dependencies needed to run the flow. Yes it will just run the tasks specified in the flow.
m
@Kevin Kho so for the flow I would just need to set the storage to github, pass in the access token, repo, etc, and that is it? as long as that file lives in the docker image, it should just work, yes?
k
The file doesn’t need to be in the Docker image as it gets pulled. The dependencies have to be in the image.
m
That is where I get a little confused with how that works; say I have a docker image that I build with docker-compose with a Dockerfile that installs all the dependencies, including Prefect into the image. How does the Prefect know I want to run the flow that I pull from Github on that same image/container that I previously built?
k
It adds commands to the Docker container when the agent runs the Flow including pulling it from storage.
m
That makes sense to me, but how does it know which container to use? I am looking at the github storage examples and haven't seen any docs that show where the docker image is defined for it to know where to look for the dependencies
k
You can pass it through the RunConfig
m
@Kevin Kho ahh yes! That's the part that didn't click for me; thank you! I shall investigate this. Thank you again!
👍 1
k
Oof I gave you the wrong docs. Here is the right one