https://prefect.io logo
Title
b

Boris Tseytlin

11/28/2022, 3:14 PM
storage_block = RemoteFileSystem(
        basepath="<s3://prefect-flows>",
        key_type="hash",
        settings=dict(
            use_ssl=False,
            key=config.STORAGE_MINIO_USER,
            secret=config.STORAGE_MINIO_USER,
            client_kwargs=dict(endpoint_url=f"http://{config.STORAGE_MINIO_URL}"),
        ),
    )
    storage_block.save("flow-storage", overwrite=True)
    <http://logging.info|logging.info>("Created storage block")
This was an extremely frustrating one. I had a local prefect running and had this one running from this docker compose config:
prefect-server:
    image: prefect_custom
    build: .
    command: prefect orion start
    depends_on:
      postgres:
        condition: service_healthy
      minio:
        condition: service_healthy
    healthcheck:
      test: curl --fail localhost:4200/api || exit 1
      interval: 5s
      timeout: 5s
      retries: 3
    ports:
      - 4200:4200
    environment:
      PREFECT_ORION_API_HOST: 0.0.0.0
      PREFECT_ORION_DATABASE_CONNECTION_URL: <postgresql+asyncpg://prefect>:test-password@postgres:5432/prefect_server
      PREFECT_ORION_ANALYTICS_ENABLED: "false"
      PREFECT_API_URL: <http://localhost:4200/api> # Client (browser) will query this API when accessing Prefect UI
      PREFECT_LOGGING_SERVER_LEVEL: INFO
    volumes:
      - ./volumes/prefect/data:/root/.prefect
      - ./volumes/prefect/flows:/flows
    networks:
      - prefect
When I accessed the UI it was fetching stuff from the local prefect because of
PREFECT_API_URL
. Switching it to the host of the machine solved it:
REFECT_API_URL: http://<host>:4200/api
🙌 1
m

Mason Menges

11/28/2022, 8:40 PM
Glad you were able to get it sorted out 😄