Closed seabnavin19 closed 1 year ago
facing the same issue when deploying on host thats not local (remote server)
I have solve this by changing the API URL:
orion:
image: prefecthq/prefect:2.4.2-python3.10
restart: always
volumes:
- prefect:/root/.prefect
entrypoint: ["prefect", "orion", "start"]
environment:
- PREFECT_ORION_API_HOST=0.0.0.0
- PREFECT_ORION_DATABASE_CONNECTION_URL=postgresql+asyncpg://postgres:postgres@database:5432/orion
- PREFECT_API_URL= <your remote server public IP> or localhost(if running in local)
ports:
- 4200:4200
depends_on:
- database
profiles: ["orion"]
## Prefect Agent
agent:
image: prefecthq/prefect:2.4.2-python3.10
restart: always
entrypoint: ["prefect", "agent", "start", "-q", "YOUR_WORK_QUEUE_NAME"]
environment:
- PREFECT_API_URL= <your remote server public IP> or localhost(if running in local)
# Use PREFECT_API_KEY if connecting the agent to Prefect Cloud
# - PREFECT_API_KEY=YOUR_API_KEY
profiles: ["agent"]
Thanks for the update, Sean. I'll add a section about this to the README. Apologies for not responding sooner - my GitHub notifications were going to spam folder.
Ok, btw your repo is a good resource thanks you
Having the same problems as OP on a Win 10 corp issued laptop today when testing this locally. When testing at home on a Mac I had no such issue.
Just an observation.
Edit:
Did simple test on a non-corp set up win 10 pro machine also
Thanks for the update - I reopened the issue and will give this a try on Windows to see if I can reproduce and fix it.
I just had the same issue on Mac, fixed by setting PREFECT_API_URL=http://127.0.0.1:4200/api
in the server part of the docker-compose.yml
file.
I just had the same issue on Mac, fixed by setting
PREFECT_API_URL=http://127.0.0.1:4200/api
in the server part of thedocker-compose.yml
file.
Good thinking. I added that to the Docker Compose file.
When I try to run the first command
I got this erorr in my ui http://localhost:4200/runs
even I run the second command
and run python flow.py I still get the same erorr, How can I make my UI access to my flow run?