This message was deleted.
# marvin-in-the-wild
s
This message was deleted.
m
Your message was too long by 213 tokens - please shorten it and try again. For reference, here's your message at the allowed limit:
Hi Team,
I'm using prefect 2.12.0 for the first time and testing this with sample prefect file with docker container on azure. Here is my docker file
Copy code
FROM prefecthq/prefect:2-python3.10

RUN apt-get update && apt-get install -y curl


COPY requirements.txt .
RUN pip install -r requirements.txt --trusted-host <http://pypi.python.org|pypi.python.org> --no-cache-dir
COPY etl_flows.py /opt/prefect/flows/etl_flows.py
COPY start_prefect.sh /opt/prefect/start_prefect.sh
WORKDIR /opt/prefect

RUN chmod +x /opt/prefect/start_prefect.sh

ENV PREFECT_API_URL="<http://127.0.0.1:4200/api>"

CMD ["./start_prefect.sh"]
Here is start_prefect.sh ```#!/bin/bash # Start the Prefect server echo "Starting Prefect server..." prefect server start --host 0.0.0.0 & # Capture the PID of the Prefect server process PREFECT_SERVER_PID=$! # Wait for the Prefect server to start echo "Waiting for Prefect server to start..." sleep 20 # Check if Prefect server is still running if ! kill -0 $PREFECT_SERVER_PID > /dev/null
It seems there's no direct documentation or GitHub issue addressing your specific case of adding a relative URL prefix in Prefect's static file URLs. However, you might be able to solve this by tweaking how Prefect serves the static assets or by adjusting your reverse proxy configuration. Here are a few steps you can try: 1. Adjust Prefect Settings: Ensure the
PREFECT_API_URL
is correctly configured to use the relative path. This would typically be in the format:
Copy code
ENV PREFECT_API_URL="<https://example-domain.com/prefect/api>"
2. Reverse Proxy Configuration: In your application gateway or proxy configuration, ensure it appropriately rewrites paths. 3. Nginx Example: If you're using an Nginx proxy, you could use the following configuration:
Copy code
location /prefect/ {
       proxy_pass <http://YourPrefectServerIP:YourPrefectServerPort/>;
       proxy_set_header Host $host;
       proxy_set_header X-Real-IP $remote_addr;
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
       proxy_set_header X-Forwarded-Proto $scheme;
   }
For specific changes and further assistance, checking Prefect’s settings documentation might be useful: * https://docs.prefect.io/latest/guides/settings/ If you've tried these solutions and still face issues, you might want to consider raising a question in the Prefect Community Slack or their Discourse forum for more tailored guidance: * https://prefect.io/slack/ * https://discourse.prefect.io/ Good luck! If you need more information, don't hesitate to ask.