Boris Tseytlin
11/28/2022, 3:14 PMstorage_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")
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
Mason Menges
11/28/2022, 8:40 PM