Steffen
11/21/2024, 9:14 AMMarvin
11/21/2024, 9:14 AMSteffen
11/21/2024, 9:15 AMMarvin
11/21/2024, 9:15 AMprofiles.toml
file for configuration. You can directly edit this file to configure server settings. This allows for custom setups depending on your use case.
2. Common Settings:
- For databases, configure server.database.connection_url
with a SQLAlchemy-compatible connection string (e.g., for SQLite or Postgres).
- Security configurations like CSRF protection can be managed via this setup.
3. Use of Environment Variables: Environment variables always take precedence over other configurations. You can set these variables for runtime behavior adjustments. For example, PREFECT_API_URL
and PREFECT_API_KEY
can be set to ensure communication with your Prefect server.
4. Command Line Interface: Utilize the Prefect CLI to manage your configuration:
- Set a Configuration: prefect config set <setting_key>=<value>
- Unset (restore default): prefect config unset <setting_key>
- View Current Settings: prefect config view
5. Reverse Proxy Setup: If you are using a reverse proxy like Nginx, configure ui.api_url
to point to your external proxy URL, ensuring proper routing of traffic to your Prefect UI instance.
For more detailed guidance, you can explore the following resources:
- Settings and Profiles Documentation
- Infrastructure Examples for Serverless Environments
Remember, using environment variables to fine-tune the server while it's running provides flexibility and ensures the correct settings are always applied.