I don't know if this is the right place to post th...
# ask-community
d
I don't know if this is the right place to post this, but I tried to upgrade from 3.0.4 to 3.0.5 and ran into an issue with the UI. I'm running prefect server in a docker container using compose, these are my settings:
Copy code
services:
  server:
    image: prefecthq/prefect:3.0.5-python3.12
    restart: unless-stopped
    volumes:
      - prefect:/root/.prefect
    entrypoint: ["prefect", "server", "start", "--host", "0.0.0.0"]
    environment:
      - PREFECT_LOGGING_SERVER_LEVEL=WARNING
      - PREFECT_API_URL=<http://127.0.0.1:4200/api>
      - PREFECT_API_DATABASE_CONNECTION_URL=${DATABASE_URL}
      - PREFECT_API_DATABASE_ECHO=False
      - PREFECT_API_DATABASE_MIGRATE_ON_START=True
    ports:
      - 4200:4200
  postgres:
    image: postgres:16.4
    volumes:
      - postgres_data:/var/lib/postgresql/data
    restart: unless-stopped
    environment:
      POSTGRES_USER: ${POSTGRES_USER}
      POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
      POSTGRES_DB: prefect
In 3.0.4 this seems to work fine, but in 3.0.5 it doesn't work when pulling up the page from somewhere else on the network (when I navigate to http://prefect.example.com:4200 for example) and the UI throws that error. I had to change PREFECT_API_URL to the host ip address (e.g. http://prefect.example.com:4200/api) to get this to work I tried removing the ENV variable altogether as well and it throws the same error except it has 0.0.0.0 instead of 127.0.0.1. I'm wondering if I should raise it as an issue or should the proper configuration for PREFECT_API_URL inside a container be the host's name/ip? Thanks for the help.
a
lol @Nate you're already typing 😂
n
hi @Doug Applegate - we made some significant changes to settings between these versions, which I suspect may be related I'll take a look at this and see if I can reproduce
🙌 1
d
Oh, FYI, I can also fix this by just adding this:
PREFECT_UI_API_URL=<http://prefect.example.com:4200/api>