From: | Максим Кольцов <kolmax94(at)gmail(dot)com> |
---|---|
To: | Murtuza Zabuawala <murtuza(dot)zabuawala(at)enterprisedb(dot)com> |
Cc: | pgadmin-hackers <pgadmin-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: [pgAdmin4][Patch] Remake Docker container packaging |
Date: | 2018-04-04 08:46:07 |
Message-ID: | CAB_KkxwFVfgP22=SmN9uS2_LV+fUpByLAhBdh7yMv_SunmTe9g@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-hackers |
I've updated patch. Now I drop tests and regressions.
And I added new env var: PGADMIN_LISTEN_PORT. Default value is 8080 for
http and 8443 for https mode.
Please review.
2018-04-02 9:40 GMT+03:00 Максим Кольцов <kolmax94(at)gmail(dot)com>:
>
>
> пн, 2 апр. 2018 г., 7:54 Murtuza Zabuawala <murtuza.zabuawala@
> enterprisedb.com>:
>
>> Hello,
>>
>> I tested the patch and it is working fine.
>>
>> - I had clean system before but after running DockerBuild, I can see 3
>> different images of pgAdmin4, Is this expected?
>>
> Yes, this is expected and is the same for old docker image. Two unnamed
> images are temporary images from build process and can be safely removed,
> if you don't want cache for next builds.
>
>
>> - We can remove /tests/ folder from each folders, we can also remove
>> /web/regression/ folder from the container, they are used to run tests.
>> We don't require them on production code.
>>
> Sounds reasonable. In fact, I believe I did that when making a prototype,
> but forgot to replicate in this patch. Will do.
>
> - Can we make the ports configurable?
>> https://redmine.postgresql.org/issues/2997
>>
> This is certainly doable. Please note, by the way, that pgadmin is now
> started on port 8080 or 8443 by default.
>
> - Allow user to choose whether to run it as Single user mode(SERVER_MODE =
>> False) or Multiuser mode(SERVER_MODE = True)
>>
>>
>> --
>> Regards,
>> Murtuza Zabuawala
>> EnterpriseDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>>
>> On Sat, Mar 31, 2018 at 11:19 PM, Максим Кольцов <kolmax94(at)gmail(dot)com>
>> wrote:
>>
>>> Hi all,
>>>
>>> I've been discussing this with Dave for about a month now. Today I
>>> finally present a proposed patch to update pgadmin4's Docker
>>> packaging.
>>>
>>> Key features of this update:
>>> - Main image is based on python:3.6-alpine3.7.
>>> Using Alpine linux leads to much smaller image
>>> - All build is done with Docker multi-stage build. First of all build
>>> the frontend in node:6 image,
>>> then build Sphinx documentation in separate Python container and in
>>> the end just install all
>>> dependencies in a clean python:3.6-alpine3.7 image, so that it does
>>> not have any leftovers from the build
>>> process and we don't rely on any tools available on the host.
>>> - Use Gunicorn (http://gunicorn.org) as lightweight HTTP / WSGI server.
>>> Gunicorn supports both HTTP and HTTPS.
>>> - Install Alpine postgresql-client package, which includes pg_dump and
>>> other tools and config
>>> PgAdmin to find these tools by default
>>> - Byte-compile all PgAdmin Python code in Dockerfile with optimization
>>> (-O) enabled. This way Python
>>> does not have to compile modules on each container restart and
>>> consume space in overlay fs
>>>
>>> Please find attached patch from "git format-patch".
>>>
>>
>>
Attachment | Content-Type | Size |
---|---|---|
0001-Re-make-Docker-container-packaging.patch | text/x-patch | 16.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Page | 2018-04-04 09:03:24 | Re: pgAdmin4 - Issue of unmaintained libraries |
Previous Message | Murtuza Zabuawala | 2018-04-04 08:43:10 | Re: [pgAdmin4][RM#3235] Code refactoring in Query tool |