Re: Queries regarding staticfiles | pgarchives

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Sahil Harpal <sahilharpal1234(at)gmail(dot)com>
Cc: PostgreSQL WWW <pgsql-www(at)postgresql(dot)org>
Subject: Re: Queries regarding staticfiles | pgarchives
Date: 2022-06-20 21:25:19
Message-ID: CABUevEzt2UuckA2i9JPrEyAFn-H58OOY4e_qe9GbvK_WXrxsLA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

On Thu, Jun 16, 2022 at 4:05 PM Sahil Harpal <sahilharpal1234(at)gmail(dot)com>
wrote:

>
>
> On Wed, 15 Jun 2022 at 22:43, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
>
>> That depends on what webserver you're using. For example, in uwsgi you'd
>> add something like:
>> static-map=/media-archives=/some/where/pgarchives/django/media
>>
>> For nginx, it'd be something like:
>> location /media-archives/ {
>> alias /some/where/pgarchives/django/media/;
>> }
>>
>
> I tried this, but still, it is showing 404.
> I created a *.ini* file and added the following values. and instead of
> running the server using runserver command I am using uwsgi.
>
> [uwsgi]
> http = localhost:8000
> wsgi-file = archives/wsgi.py
> static-map = /media-archives=/pgarchives/django/media
>
> Am I missing anything here?
>

Assuming your pgarchives checkout is in /pgarchives/ that seems like it
would be correct.

I personally use the chdir setting in uwsgi rater than the wsgi-file, but
that shouldn't affect the static mapping.

Oh. Yes, anything outside of /list/ is loaded from pgweb. The dyncss is one
>> of them. And yes, this is kind of a hacky and terrible way, but that's how
>> it is right now. Certain parts of them have to be kept in sync.
>>
>> We need them separately because the same pgarchives code is also run
>> standalone, for our private archives. And in that scenario, there is no
>> pgweb involved.
>>
>
> Okay, so let's say if I want to make some changes in
> https://www.postgresql.org/list/,
> https://www.postgresql.org/list/pgsql-admin/,
> https://www.postgresql.org/list/pgsql-admin/2022-06/ etc. In which file
> should I make changes? main.css of pgweb or pgarchives or both (since
> pgarchives can also run standalone)?
>

Annoyingly enough, both.

--
Magnus Hagander
Me: https://www.hagander.net/ <http://www.hagander.net/>
Work: https://www.redpill-linpro.com/ <http://www.redpill-linpro.com/>

In response to

Browse pgsql-www by date

  From Date Subject
Next Message Jacob Champion 2022-06-24 16:01:20 CFM permissions for 2022-07
Previous Message Magnus Hagander 2022-06-20 16:10:28 Re: can not download mbox