battlefield-portal-community / bfportal.gg

A website that enables players to share Battlefield Portal Mods (Battlefield 2042). This repo serves its source code
http://bfportal.gg/
GNU General Public License v3.0
10 stars 6 forks source link

Use python alpine to reduce image size #198

Closed p0lygun closed 1 year ago

p0lygun commented 1 year ago

The current image size is 653MB using alpine we can make it smaller,

Resources

https://medium.com/c0d1um/building-django-docker-image-with-alpine-32de65d2706

p0lygun commented 1 year ago

a docker file for installing poetry https://github.com/FrederikP/python-poetry-alpine/blob/master/Dockerfile

p0lygun commented 1 year ago

pg_config needs to be installed in alpine linux

possible fix via using

RUN apk update \
    && apk add libpq postgresql-dev \
    && apk add build-base
p0lygun commented 1 year ago

closing as alpine is too unstable in production and the gain is not that great