You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@airflow.apache.org by scorpio 2005 <co...@yahoo.com.INVALID> on 2016/06/28 08:01:50 UTC
How to change airflow static folder URL root path
Hi,
we are trying to do a nginx reverse proxy to airflow, but due to the multi mix of docker apps, we are ending up by requiring proxy URL to /static (for css , html, and js files). So in airflow, we intend to add a suffix url to /static files, so that it can be uniquely identified by nginx. for example(http://example.com/airflow/static).
Is any specific configuration using [/static]. If so, how to change it. Highly appreciated if anybody can help to sort out this issue?
Regards,Cool Pilot
Re: How to change airflow static folder URL root path
Posted by Maxime Beauchemin <ma...@gmail.com>.
We also use a nginx reverse proxy in from of airflow and it works well,
can't you simply setup a sub-domain to avoid conflicts?
Max
On Sun, Jul 3, 2016 at 2:56 AM, scorpio 2005 <
coolpilotscorpio@yahoo.com.invalid> wrote:
> Hi,
> Can you please help to fix the issue?
>
> On Wednesday, June 29, 2016 10:16 AM, scorpio 2005
> <co...@yahoo.com.INVALID> wrote:
>
>
>
>
>
>
> Hi,
> we are trying to do a nginx reverse proxy to airflow, but due to the multi
> mix of docker apps, we are ending up by requiring proxy URL to /static (for
> css , html, and js files). So in airflow, we intend to add a suffix url to
> /static files, so that it can be uniquely identified by nginx. for example(
> http://example.com/airflow/static).
>
> Is any specific configuration using [/static]. If so, how to change it.
> Highly appreciated if anybody can help to sort out this issue?
>
> Regards,Cool Pilot
>
>
>
>
>
Re: How to change airflow static folder URL root path
Posted by Sumit Maheshwari <su...@gmail.com>.
The problem is happening from the airflow code, where we are calling
*url_for('static',
..)* at many places. If we can somehow override *url_for* method and return
the desired path (/airflow-host-id/static in this case), then the problem
could be solved.
I did some googling to find out *overirder_url_for* method, but couldn't
find a working model yet.
http://flask.pocoo.org/snippets/40/
http://stackoverflow.com/questions/9513072/more-than-one-static-path-in-local-flask-instance
http://stackoverflow.com/questions/25412636/how-can-i-override-the-static-file-handler-in-flask
Thanks,
Sumit
On Wed, Jul 6, 2016 at 2:29 AM, Yogesh Garg <yo...@gmail.com> wrote:
> Hi,
>
> We are also trying to setup airflow behind nginx reverse proxy. Here is our
> use case:
>
> We've multiple airflow setups running for different end users. We want that
> this setup to be accessed in following fashion:
>
> *https://example.com/airflow-host-id/admin/
> <https://example.com/airflow-host-id/admin/>..*
>
> Where example.com is our common domain name and airflow-host-id is unique
> for each end user. We've setup a nginx proxy in front, which identifies by
> looking at airflow-host-id where to redirect that url.
>
> As suggested by Bolke, I changed static_url_path to /airflow-host-id/admin/
> but that did not work out alone for our use case. I think we might have to
> change url, endpoint as well. Can someone suggest what changes would be
> needed for our use case. I would be happy to raise a PR for the same if it
> works out!
>
> Thanks.
>
>
> On Tue, Jul 5, 2016 at 12:22 PM, Bolke de Bruin <bd...@gmail.com> wrote:
>
> > As discussed on gitter, we currently don’t expose static_url_path to the
> > config so you either need to
> >
> > 1) adjust app.py to take static_url_path into account (PR welcome!)
> > 2) put an extra nginx in front of airflow that does an extra reverse
> proxy
> > for you (ie. translates /xxx to /static)
> >
> > Bolke
> >
> > > Op 3 jul. 2016, om 11:56 heeft scorpio 2005
> > <co...@yahoo.com.INVALID> het volgende geschreven:
> > >
> > > Hi,
> > > Can you please help to fix the issue?
> > >
> > > On Wednesday, June 29, 2016 10:16 AM, scorpio 2005
> > <co...@yahoo.com.INVALID> wrote:
> > >
> > >
> > >
> > >
> > >
> > >
> > > Hi,
> > > we are trying to do a nginx reverse proxy to airflow, but due to the
> > multi mix of docker apps, we are ending up by requiring proxy URL to
> > /static (for css , html, and js files). So in airflow, we intend to add a
> > suffix url to /static files, so that it can be uniquely identified by
> > nginx. for example(http://example.com/airflow/static).
> > >
> > > Is any specific configuration using [/static]. If so, how to change it.
> > Highly appreciated if anybody can help to sort out this issue?
> > >
> > > Regards,Cool Pilot
> > >
> > >
> > >
> >
> >
>
Re: How to change airflow static folder URL root path
Posted by Yogesh Garg <yo...@gmail.com>.
Hi,
We are also trying to setup airflow behind nginx reverse proxy. Here is our
use case:
We've multiple airflow setups running for different end users. We want that
this setup to be accessed in following fashion:
*https://example.com/airflow-host-id/admin/
<https://example.com/airflow-host-id/admin/>..*
Where example.com is our common domain name and airflow-host-id is unique
for each end user. We've setup a nginx proxy in front, which identifies by
looking at airflow-host-id where to redirect that url.
As suggested by Bolke, I changed static_url_path to /airflow-host-id/admin/
but that did not work out alone for our use case. I think we might have to
change url, endpoint as well. Can someone suggest what changes would be
needed for our use case. I would be happy to raise a PR for the same if it
works out!
Thanks.
On Tue, Jul 5, 2016 at 12:22 PM, Bolke de Bruin <bd...@gmail.com> wrote:
> As discussed on gitter, we currently don’t expose static_url_path to the
> config so you either need to
>
> 1) adjust app.py to take static_url_path into account (PR welcome!)
> 2) put an extra nginx in front of airflow that does an extra reverse proxy
> for you (ie. translates /xxx to /static)
>
> Bolke
>
> > Op 3 jul. 2016, om 11:56 heeft scorpio 2005
> <co...@yahoo.com.INVALID> het volgende geschreven:
> >
> > Hi,
> > Can you please help to fix the issue?
> >
> > On Wednesday, June 29, 2016 10:16 AM, scorpio 2005
> <co...@yahoo.com.INVALID> wrote:
> >
> >
> >
> >
> >
> >
> > Hi,
> > we are trying to do a nginx reverse proxy to airflow, but due to the
> multi mix of docker apps, we are ending up by requiring proxy URL to
> /static (for css , html, and js files). So in airflow, we intend to add a
> suffix url to /static files, so that it can be uniquely identified by
> nginx. for example(http://example.com/airflow/static).
> >
> > Is any specific configuration using [/static]. If so, how to change it.
> Highly appreciated if anybody can help to sort out this issue?
> >
> > Regards,Cool Pilot
> >
> >
> >
>
>
Re: How to change airflow static folder URL root path
Posted by Bolke de Bruin <bd...@gmail.com>.
As discussed on gitter, we currently don’t expose static_url_path to the config so you either need to
1) adjust app.py to take static_url_path into account (PR welcome!)
2) put an extra nginx in front of airflow that does an extra reverse proxy for you (ie. translates /xxx to /static)
Bolke
> Op 3 jul. 2016, om 11:56 heeft scorpio 2005 <co...@yahoo.com.INVALID> het volgende geschreven:
>
> Hi,
> Can you please help to fix the issue?
>
> On Wednesday, June 29, 2016 10:16 AM, scorpio 2005 <co...@yahoo.com.INVALID> wrote:
>
>
>
>
>
>
> Hi,
> we are trying to do a nginx reverse proxy to airflow, but due to the multi mix of docker apps, we are ending up by requiring proxy URL to /static (for css , html, and js files). So in airflow, we intend to add a suffix url to /static files, so that it can be uniquely identified by nginx. for example(http://example.com/airflow/static).
>
> Is any specific configuration using [/static]. If so, how to change it. Highly appreciated if anybody can help to sort out this issue?
>
> Regards,Cool Pilot
>
>
>
Re: How to change airflow static folder URL root path
Posted by scorpio 2005 <co...@yahoo.com.INVALID>.
Hi,
Can you please help to fix the issue?
On Wednesday, June 29, 2016 10:16 AM, scorpio 2005 <co...@yahoo.com.INVALID> wrote:
Hi,
we are trying to do a nginx reverse proxy to airflow, but due to the multi mix of docker apps, we are ending up by requiring proxy URL to /static (for css , html, and js files). So in airflow, we intend to add a suffix url to /static files, so that it can be uniquely identified by nginx. for example(http://example.com/airflow/static).
Is any specific configuration using [/static]. If so, how to change it. Highly appreciated if anybody can help to sort out this issue?
Regards,Cool Pilot
How to change airflow static folder URL root path
Posted by scorpio 2005 <co...@yahoo.com.INVALID>.
Hi,
we are trying to do a nginx reverse proxy to airflow, but due to the multi mix of docker apps, we are ending up by requiring proxy URL to /static (for css , html, and js files). So in airflow, we intend to add a suffix url to /static files, so that it can be uniquely identified by nginx. for example(http://example.com/airflow/static).
Is any specific configuration using [/static]. If so, how to change it. Highly appreciated if anybody can help to sort out this issue?
Regards,Cool Pilot