Has anyone successfully launched an agent using do...
# prefect-server
s
Has anyone successfully launched an agent using docker-compose that talks to the apollo server? Screenshotting my current agent container in case theres an obvious error - currently it runs and connects but maybe the config is messed up because it never finds any flows to run. If I run
prefect local agent start --label any
in my terminal, it works beautifully. (Edit: Actually now when I run it its stuck on “Waiting for flow runs”). Inside a docker container (using local or docker agents) - connects fine by then always says “No flow runs found”. This is the same whether I run a docker or local agent in the docker-compose, with and without attaching labels to anything, with both local storage and S3, and with local, universal and docker run configs explicitly set.
z
Hi @Samuel Hinton -- could you try including
/graphql
at the end of your API url?
s
Have tried this, alas no dice
z
Hmm. If you post this in a code block I can try to get it working locally later today.
It seems worth noting that the local agent inside the docker container will likely have a weird label as it detects the hostname -- not sure if that'd effect your setup.
s
If youre able to get something running I will be extremely grateful, have spent the whole day changing various things hoping to get lucky and have it work. The .env file and docker-compose should get everything up and running, with a local and a docker agent, and the testflow has a flow for local and docker as well.
Better docker compose
But yes, I saw a previous docker-compose from another user back in Sep/October that had a docker agent running, so I put that in as well with no success (its in the docker-compose attached above), screenshotted for easy viewing convenience:
In case it helps for debugging @Zanie I have tried: • Using Local, universal and docker runs • Running prefect agent both directly via command and also by passing it to bash • Using local storage (with add_default_labels=False) and using an S3 bucket • Using flows+agents with explicit label matching and also when they both have no labels • Going into the container command line and launching the prefect agent manually • Ensuring that the local agent was launched with the no hostname option, and docker agent with and without the network or docker interface I can confirm that, within the agent container, I could run all the
prefect get
commands and see the flows+tasks, so it seemed to be connecting to the right place. I hope thats somewhat useful in the debugging, please let me know if theres anything else I can run to help out, Ill keep the work laptop open tonight (London time) just in case 🙂