I am trying to run the orion server inside a docke...
# prefect-community
m
I am trying to run the orion server inside a docker container, but I can’t get it to work. This is my command:
docker run --platform linux/amd64 -ti -p 4200:4200 --expose=4200 prefecthq/prefect:2.0.1-python3.9
Once my container is ready, I execute
prefect orion start
inside of it I see the in the logs that the server successfully started, however I don’t get a connection when I open http://localhost:4200 in my browser.
a
can you try in a virtual environment instead? running in docker is a bit harder with networking, bind mounting volumes, ...
m
Just got it to work 😄 I now run
prefect orion start --host 0.0.0.0
inside the container
🙌 2
a
yes that works, but unless you mount a volume, you can't run anything against it?
m
I haven’t tried yet, just saw the UI and was happy 😂 I plan to use an external postgres db, so as long as I provide the connection string I don’t need a volume, right?
😂 1
a
you're right, works
Copy code
[profiles.docker]
PREFECT_API_URL = "<http://0.0.0.0:4200/api>"
PREFECT_LOGGING_LEVEL = "DEBUG"
i.e. works without volumes