From 15c9704d44c349ced8dd40def225d3c6d3ce99ab Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Tue, 12 May 2026 11:54:14 +0200 Subject: [PATCH 1/4] fixes --- src/wolnelektury/templates/account/base.html | 2 +- src/wolnelektury/templates/socialaccount/connections.html | 2 +- src/wolnelektury/templates/socialaccount/login_cancelled.html | 2 +- src/wolnelektury/templates/user.html | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/wolnelektury/templates/account/base.html b/src/wolnelektury/templates/account/base.html index 40c1de9e7..093fcb2a6 100644 --- a/src/wolnelektury/templates/account/base.html +++ b/src/wolnelektury/templates/account/base.html @@ -1,7 +1,7 @@ {% extends "base_simple.html" %} {% block body %} -
+
{% block content %}{% endblock %}
{% endblock %} diff --git a/src/wolnelektury/templates/socialaccount/connections.html b/src/wolnelektury/templates/socialaccount/connections.html index dcee6ff87..fd4110389 100644 --- a/src/wolnelektury/templates/socialaccount/connections.html +++ b/src/wolnelektury/templates/socialaccount/connections.html @@ -5,7 +5,7 @@ {% block head_title %}{% trans "Połączone konta" %}{% endblock %} {% block body %} -
+

{% trans "Połączone konta" %}

diff --git a/src/wolnelektury/templates/socialaccount/login_cancelled.html b/src/wolnelektury/templates/socialaccount/login_cancelled.html index 3e95773c9..98da1308b 100644 --- a/src/wolnelektury/templates/socialaccount/login_cancelled.html +++ b/src/wolnelektury/templates/socialaccount/login_cancelled.html @@ -5,7 +5,7 @@ {% block head_title %}{% trans "Logowanie anulowane" %}{% endblock %} {% block body %} -
+

{% trans "Logowanie anulowane" %}

diff --git a/src/wolnelektury/templates/user.html b/src/wolnelektury/templates/user.html index e9a504781..42078df59 100644 --- a/src/wolnelektury/templates/user.html +++ b/src/wolnelektury/templates/user.html @@ -20,7 +20,6 @@ {% if request.user.membership %}

{% trans "Wspierasz Wolne Lektury, dziękujemy!" %}

{% endif %} -

{% trans "Zewnętrzne konta" %}

{% trans "Wyloguj się" %}

{% endblock %} -- 2.20.1 From fd86b5e2d53eb222653b5cbed22bc334238fd2fa Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Tue, 12 May 2026 12:00:31 +0200 Subject: [PATCH 2/4] cover size fix --- src/wolnelektury/static/2022/styles/layout/_books.scss | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/wolnelektury/static/2022/styles/layout/_books.scss b/src/wolnelektury/static/2022/styles/layout/_books.scss index c983b3876..e14adbfac 100644 --- a/src/wolnelektury/static/2022/styles/layout/_books.scss +++ b/src/wolnelektury/static/2022/styles/layout/_books.scss @@ -108,9 +108,6 @@ img { width: 100%; - @include rwd($break3) { - width: 173px; - } } } -- 2.20.1 From 50995366c1728536907fbeded492f681c56c1b0d Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Thu, 14 May 2026 11:38:24 +0200 Subject: [PATCH 3/4] Fuller docker config --- Dockerfile | 24 ++++++++++++++++++++++++ Makefile | 2 +- docker-compose.yml | 6 +++++- scripts/entrypoint.sh | 13 +++++++++++++ src/wolnelektury/settings/basic.py | 2 +- 5 files changed, 44 insertions(+), 3 deletions(-) create mode 100755 scripts/entrypoint.sh diff --git a/Dockerfile b/Dockerfile index ed113fe3b..b23530b9c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,13 +37,37 @@ WORKDIR /app/src RUN mkdir /app/.ipython + + + FROM base AS dev #RUN pip install --no-cache-dir coverage + + FROM base AS prod +USER root + RUN pip install --no-cache-dir gunicorn +USER app + COPY src /app/src + + + + +FROM prod AS static-builder + +RUN python manage.py collectstatic --noinput + + + +FROM nginx:alpine AS nginx + +# COPY nginx.conf conf.d/... + +COPY --from=static-builder /app/var/static /app/var/static diff --git a/Makefile b/Makefile index 98a68987c..59e222af6 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ build: UID=$(UID) GID=$(GID) docker compose build shell: - UID=$(UID) GID=$(GID) docker compose run --rm web bash + UID=$(UID) GID=$(GID) docker compose exec web bash logs: docker compose logs -f diff --git a/docker-compose.yml b/docker-compose.yml index b6515098d..bda15bb40 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,16 +7,21 @@ x-app-base: &app-base GID: ${GID:-1000} env_file: - .env + environment: + DEBUG: "True" volumes: - ./src:/app/src + - ./scripts:/app/scripts - ./var/media:/app/var/media - ./var/static:/app/var/static - ./var/counters/:/app/var/counters + - ${LIBRARIAN:-/nonexistent}:/${LIBRARIAN:+edita}ble/librarian - ipython:/app/.ipython depends_on: - db - redis - memcached + entrypoint: /app/scripts/entrypoint.sh services: web: @@ -31,7 +36,6 @@ services: db: image: postgres:18 - container_name: db env_file: - .env volumes: diff --git a/scripts/entrypoint.sh b/scripts/entrypoint.sh new file mode 100755 index 000000000..7d809ef83 --- /dev/null +++ b/scripts/entrypoint.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +# For use in development only. +# Installs in editable mode any libs mounted under /editable/ +# This way, we can easily work on e.g. librarian. + +for lib in /editable/* +do + [ -d "$lib" ] || continue + pip install -e $lib +done + +exec "$@" diff --git a/src/wolnelektury/settings/basic.py b/src/wolnelektury/settings/basic.py index 5c86787f8..84503ed5f 100644 --- a/src/wolnelektury/settings/basic.py +++ b/src/wolnelektury/settings/basic.py @@ -3,7 +3,7 @@ # import os -DEBUG = True +DEBUG = os.environ.get('DEBUG', '') ADMINS = [ # ('Your Name', 'your_email@domain.com'), -- 2.20.1 From 999910c649979e70c5c73e1a4d853201dc6c0362 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Thu, 14 May 2026 11:38:41 +0200 Subject: [PATCH 4/4] Minor layout fixes --- src/wolnelektury/static/2022/styles/layout/_annoy.scss | 2 +- src/wolnelektury/static/2022/styles/layout/_checkout.scss | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/wolnelektury/static/2022/styles/layout/_annoy.scss b/src/wolnelektury/static/2022/styles/layout/_annoy.scss index 18c8df847..d66cb165e 100644 --- a/src/wolnelektury/static/2022/styles/layout/_annoy.scss +++ b/src/wolnelektury/static/2022/styles/layout/_annoy.scss @@ -433,7 +433,7 @@ } p { - margin: 1em 0; + margin: 0 0 1em 0; } .l-button { display: inline-block; diff --git a/src/wolnelektury/static/2022/styles/layout/_checkout.scss b/src/wolnelektury/static/2022/styles/layout/_checkout.scss index 135c65310..a1ea7b4f3 100644 --- a/src/wolnelektury/static/2022/styles/layout/_checkout.scss +++ b/src/wolnelektury/static/2022/styles/layout/_checkout.scss @@ -111,20 +111,21 @@ letter-spacing: -0.02em; color: #92BD39; margin: 0; + margin-bottom: 23px; } p { font-weight: normal; font-size: 18px; line-height: 150%; - margin-top: 8px; + margin-top: 0; + margin-bottom: 8px; &:first-of-type { font-weight: 600; font-size: 21.5px; line-height: 140%; letter-spacing: -0.01em; - margin-top: 23px; } } } -- 2.20.1