Re: Enable development via Docker

Lists: Postg사설 토토SQL : Postg사설 토토SQL 메일 링리스트 : 2020-02-26 10:10 이후 PGSQL www
From: Richard Yen <richyen3(at)gmail(dot)com>
To: pgsql-www(at)lists(dot)postgresql(dot)org
Subject: Enable development via Docker
Date: 2020-02-22 21:00:00
Message-ID: CAKH4vDjirsXXxKDVfcDNOcodUdHvTLwr6Lr_VJUYN3XwM2ypVw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-www

Hi,

After briefly discussing with J. Katz on Slack, I just thought I'd share a
few Docker-related files to make it easier to spin up development
environments for the website. Hope this might prove to be useful.

Cheers,
--Richard

Attachment Content-Type Size
0002-run-scripts-to-load-varnish-and-from-load_initial_da.patch application/octet-stream 1.3 KB
0001-Create-docker-files-to-make-development-easier.patch application/octet-stream 1.5 KB

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Richard Yen <richyen3(at)gmail(dot)com>
Cc: PostgreSQL WWW <pgsql-www(at)lists(dot)postgresql(dot)org>
Subject: Re: Enable development via Docker
Date: 2020-02-23 14:27:36
Message-ID: CABUevEwRuLibrYVYT_MOhdFOp_w43bPwTeeGU359gq=98dcW1w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-www

On Sat, Feb 22, 2020 at 10:02 PM Richard Yen <richyen3(at)gmail(dot)com> wrote:
>
> Hi,
>
> After briefly discussing with J. Katz on Slack, I just thought I'd share a few Docker-related files to make it easier to spin up development environments for the website. Hope this might prove to be useful.

First of all, I like this idea -- anything making dev easier is a
strong win here!

Your second file is named "load varnish", but does not contain
anything about varnish at all -- did you forget something there?

To be properly productive I think we need to figure out a way to load
some more data into the system though. In particular, we need at least
some news, events and *releases* on the frontpage to make it relevant
at all. And probably at least one batch of documentation..

Not entirely sure about how to source that data though, we probably
don't want to stick it in as fixtures since it's data that changes.
Perhaps have a cronjob somewhere on the production system that dumps
out a "useful dump" once a week or so and have the scripts somehow
download (and cache) that?

//Magnus


From: Richard Yen <richyen3(at)gmail(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: PostgreSQL WWW <pgsql-www(at)lists(dot)postgresql(dot)org>
Subject: Re: Enable development via Docker
Date: 2020-02-24 00:02:21
Message-ID: CAKH4vDgSqD2Jn4MhHwnxBSygVa4Z9Zz+5AfP1e6koSnZajGJJA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: Postg토토 베이SQL : Postg토토 베이SQL 메일 링리스트 : 2020-02-24 00:02 이후 PGSQL www

On Sun, Feb 23, 2020 at 6:27 AM Magnus Hagander <magnus(at)hagander(dot)net> wrote:

> On Sat, Feb 22, 2020 at 10:02 PM Richard Yen <richyen3(at)gmail(dot)com> wrote:
> >
> > Hi,
> >
> > After briefly discussing with J. Katz on Slack, I just thought I'd share
> a few Docker-related files to make it easier to spin up development
> environments for the website. Hope this might prove to be useful.
>
> First of all, I like this idea -- anything making dev easier is a
> strong win here!
>

Thanks! Glad this might help you guys out. I know there are more
improvements to be made on these patches, so I'll work on them.

> Your second file is named "load varnish", but does not contain
> anything about varnish at all -- did you forget something there?
>

Varnish is loaded in the *.sql files in the sql/ folder. I included that
as a part of the postgres container's initdb mount. Granted, there's more
logic to be handled because there's the dev version of the varnish plpgsql
functions that need to be loaded v. the prod version. I'll work on that
when I get a chance--look for a more comprehensive patch to come through
this thread.

>
> To be properly productive I think we need to figure out a way to load
> some more data into the system though. In particular, we need at least
> some news, events and *releases* on the frontpage to make it relevant
> at all. And probably at least one batch of documentation..
>

Yeah, I can also generate that info. Would there be some sample data that
I can work with? Is a dump of this data somewhere? I couldn't find it on
git.postgresql.org (or maybe I didn't look hard enough)

Cheers,
--Richard


From: Richard Yen <richyen3(at)gmail(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: PostgreSQL WWW <pgsql-www(at)lists(dot)postgresql(dot)org>
Subject: Re: Enable development via Docker
Date: 2020-02-26 01:49:59
Message-ID: CAKH4vDj12p9-Q6tB6UDF_AEwFcD80YZUKkRftz6Yn13a8DfeJQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-www

On Sun, Feb 23, 2020 at 4:02 PM Richard Yen <richyen3(at)gmail(dot)com> wrote:

>
> On Sun, Feb 23, 2020 at 6:27 AM Magnus Hagander <magnus(at)hagander(dot)net>
> wrote:
>
>>
>> Your second file is named "load varnish", but does not contain
>> anything about varnish at all -- did you forget something there?
>>
>
> Varnish is loaded in the *.sql files in the sql/ folder. I included that
> as a part of the postgres container's initdb mount. Granted, there's more
> logic to be handled because there's the dev version of the varnish plpgsql
> functions that need to be loaded v. the prod version. I'll work on that
> when I get a chance--look for a more comprehensive patch to come through
> this thread.
>

Just to follow up on this -- in sql/ there's a varnish.sql and a
varnish_local.sql. Is there a reason to use varnish_local.sql instead of
varnish.sql while developing? It's just a bunch of no-op functions, but I
can't seem to see a clear advantage of using varnish_local.sql instead of
varnish.sql -- it's not like it would hamper development or otherwise make
it difficult, would it? Can we do away with varnish_local.sql?

Cheers,
--Richard


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Richard Yen <richyen3(at)gmail(dot)com>
Cc: PostgreSQL WWW <pgsql-www(at)lists(dot)postgresql(dot)org>
Subject: Re: Enable development via Docker
Date: 2020-02-26 10:10:33
Message-ID: CABUevEz3CF_UJdQ2bUq+xLgpJJ6eAR1y7yrD9=7EP9kdtHWv2Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: Postg사설 토토SQL : Postg사설 토토SQL 메일 링리스트 : 2020-02-26 10:10 이후 PGSQL www

On Wed, Feb 26, 2020 at 2:50 AM Richard Yen <richyen3(at)gmail(dot)com> wrote:
>
>
>
> On Sun, Feb 23, 2020 at 4:02 PM Richard Yen <richyen3(at)gmail(dot)com> wrote:
>>
>>
>> On Sun, Feb 23, 2020 at 6:27 AM Magnus Hagander <magnus(at)hagander(dot)net> wrote:
>>>
>>>
>>> Your second file is named "load varnish", but does not contain
>>> anything about varnish at all -- did you forget something there?
>>
>>
>> Varnish is loaded in the *.sql files in the sql/ folder. I included that as a part of the postgres container's initdb mount. Granted, there's more logic to be handled because there's the dev version of the varnish plpgsql functions that need to be loaded v. the prod version. I'll work on that when I get a chance--look for a more comprehensive patch to come through this thread.
>
>
> Just to follow up on this -- in sql/ there's a varnish.sql and a varnish_local.sql. Is there a reason to use varnish_local.sql instead of varnish.sql while developing? It's just a bunch of no-op functions, but I can't seem to see a clear advantage of using varnish_local.sql instead of varnish.sql -- it's not like it would hamper development or otherwise make it difficult, would it? Can we do away with varnish_local.sql?

Not really, I think -- not anymore. It used to be a bigger difference
-- when we used pgq it removed a dependency on that.

The only downside now is that your table for varnish purges will
eventually fill up, if you keep at it long enough :)

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