You've already forked snikket-web-portal
Merge pull request #157 from Zash/debian12
Switch base image to Debian 12
This commit is contained in:
28
Dockerfile
28
Dockerfile
@@ -1,28 +1,22 @@
|
|||||||
FROM debian:bullseye-slim AS build
|
FROM debian:bookworm-slim AS build
|
||||||
|
|
||||||
RUN set -eu; \
|
RUN set -eu; \
|
||||||
export DEBIAN_FRONTEND=noninteractive ; \
|
export DEBIAN_FRONTEND=noninteractive ; \
|
||||||
apt-get update ; \
|
apt-get update ; \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
python3 python3-pip python3-setuptools python3-wheel \
|
python3 python3-mypy python3-dotenv python3-toml python3-babel python3-distutils \
|
||||||
libpython3-dev \
|
sassc make;
|
||||||
make build-essential;
|
|
||||||
|
|
||||||
COPY requirements.txt /opt/snikket-web-portal/requirements.txt
|
|
||||||
COPY build-requirements.txt /opt/snikket-web-portal/build-requirements.txt
|
|
||||||
COPY Makefile /opt/snikket-web-portal/Makefile
|
COPY Makefile /opt/snikket-web-portal/Makefile
|
||||||
COPY snikket_web/ /opt/snikket-web-portal/snikket_web
|
COPY snikket_web/ /opt/snikket-web-portal/snikket_web
|
||||||
COPY babel.cfg /opt/snikket-web-portal/babel.cfg
|
COPY babel.cfg /opt/snikket-web-portal/babel.cfg
|
||||||
|
|
||||||
WORKDIR /opt/snikket-web-portal
|
WORKDIR /opt/snikket-web-portal
|
||||||
|
|
||||||
RUN set -eu; \
|
RUN make
|
||||||
pip3 install -r requirements.txt; \
|
|
||||||
pip3 install -r build-requirements.txt; \
|
|
||||||
make;
|
|
||||||
|
|
||||||
|
|
||||||
FROM debian:bullseye-slim
|
FROM debian:bookworm-slim
|
||||||
|
|
||||||
ARG BUILD_SERIES=dev
|
ARG BUILD_SERIES=dev
|
||||||
ARG BUILD_ID=0
|
ARG BUILD_ID=0
|
||||||
@@ -33,19 +27,19 @@ ENV SNIKKET_WEB_PYENV=/etc/snikket-web-portal/env.py
|
|||||||
|
|
||||||
ENV SNIKKET_WEB_PROSODY_ENDPOINT=http://127.0.0.1:5280/
|
ENV SNIKKET_WEB_PROSODY_ENDPOINT=http://127.0.0.1:5280/
|
||||||
|
|
||||||
COPY requirements.txt /opt/snikket-web-portal/requirements.txt
|
|
||||||
|
|
||||||
WORKDIR /opt/snikket-web-portal
|
WORKDIR /opt/snikket-web-portal
|
||||||
|
|
||||||
RUN set -eu; \
|
RUN set -eu; \
|
||||||
export DEBIAN_FRONTEND=noninteractive ; \
|
export DEBIAN_FRONTEND=noninteractive ; \
|
||||||
apt-get update ; \
|
apt-get update ; \
|
||||||
apt-get install -y --no-install-recommends \
|
apt-get install -y --no-install-recommends \
|
||||||
python3 python3-pip python3-setuptools python3-wheel build-essential libpython3-dev netcat; \
|
netcat-traditional python3 python3-setuptools python3-pip \
|
||||||
pip3 install -r requirements.txt; \
|
python3-aiohttp python3-email-validator python3-flask-babel \
|
||||||
apt-get remove -y --autoremove build-essential libpython3-dev; \
|
python3-flaskext.wtf python3-hsluv python3-hypercorn \
|
||||||
|
python3-quart python3-typing-extensions python3-wtforms ; \
|
||||||
|
pip3 install --break-system-packages environ-config ; \
|
||||||
|
apt-get remove -y --purge python3-pip python3-setuptools; \
|
||||||
apt-get clean ; rm -rf /var/lib/apt/lists; \
|
apt-get clean ; rm -rf /var/lib/apt/lists; \
|
||||||
pip3 install hypercorn; \
|
|
||||||
rm -rf /root/.cache;
|
rm -rf /root/.cache;
|
||||||
|
|
||||||
HEALTHCHECK CMD nc -zv ${SNIKKET_TWEAK_PORTAL_INTERNAL_HTTP_INTERFACE:-127.0.0.1} ${SNIKKET_TWEAK_PORTAL_INTERNAL_HTTP_PORT:-5765}
|
HEALTHCHECK CMD nc -zv ${SNIKKET_TWEAK_PORTAL_INTERNAL_HTTP_INTERFACE:-127.0.0.1} ${SNIKKET_TWEAK_PORTAL_INTERNAL_HTTP_PORT:-5765}
|
||||||
|
|||||||
4
Makefile
4
Makefile
@@ -6,7 +6,7 @@ translation_basepath = snikket_web/translations
|
|||||||
pot_file = $(translation_basepath)/messages.pot
|
pot_file = $(translation_basepath)/messages.pot
|
||||||
|
|
||||||
PYTHON3 ?= python3
|
PYTHON3 ?= python3
|
||||||
SCSSC ?= $(PYTHON3) -m scss --load-path snikket_web/scss/
|
SCSSC ?= sassc --load-path snikket_web/scss/
|
||||||
|
|
||||||
all: build_css compile_translations
|
all: build_css compile_translations
|
||||||
|
|
||||||
@@ -14,7 +14,7 @@ build_css: $(generated_css_files)
|
|||||||
|
|
||||||
$(generated_css_files): snikket_web/static/css/%.css: snikket_web/scss/%.scss $(scss_files) $(scss_includes)
|
$(generated_css_files): snikket_web/static/css/%.css: snikket_web/scss/%.scss $(scss_files) $(scss_includes)
|
||||||
mkdir -p snikket_web/static/css/
|
mkdir -p snikket_web/static/css/
|
||||||
$(SCSSC) -o "$@" "$<"
|
$(SCSSC) "$<" "$@"
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f $(generated_css_files)
|
rm -f $(generated_css_files)
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
pyscss~=1.3
|
|
||||||
mypy
|
mypy
|
||||||
python-dotenv~=0.15
|
python-dotenv~=0.15
|
||||||
types-toml
|
types-toml
|
||||||
|
|||||||
@@ -16,11 +16,13 @@ import aiohttp
|
|||||||
import xml.etree.ElementTree as ET
|
import xml.etree.ElementTree as ET
|
||||||
|
|
||||||
from quart import (
|
from quart import (
|
||||||
current_app, _app_ctx_stack, session as http_session, abort, redirect,
|
current_app, session as http_session, abort, redirect,
|
||||||
url_for,
|
url_for,
|
||||||
)
|
)
|
||||||
import quart
|
import quart
|
||||||
|
|
||||||
|
from flask import g as _app_ctx_stack
|
||||||
|
|
||||||
import werkzeug.exceptions
|
import werkzeug.exceptions
|
||||||
|
|
||||||
from . import xmpputil
|
from . import xmpputil
|
||||||
@@ -166,7 +168,7 @@ class HTTPSessionManager:
|
|||||||
})
|
})
|
||||||
|
|
||||||
async def teardown(self, exc: typing.Optional[BaseException]) -> None:
|
async def teardown(self, exc: typing.Optional[BaseException]) -> None:
|
||||||
app_ctx = _app_ctx_stack.top
|
app_ctx = _app_ctx_stack
|
||||||
try:
|
try:
|
||||||
session = getattr(app_ctx, self._app_context_attribute)
|
session = getattr(app_ctx, self._app_context_attribute)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
@@ -183,7 +185,7 @@ class HTTPSessionManager:
|
|||||||
await session.__aexit__(exc_type, exc, traceback)
|
await session.__aexit__(exc_type, exc, traceback)
|
||||||
|
|
||||||
async def __aenter__(self) -> aiohttp.ClientSession:
|
async def __aenter__(self) -> aiohttp.ClientSession:
|
||||||
app_ctx = _app_ctx_stack.top
|
app_ctx = _app_ctx_stack
|
||||||
try:
|
try:
|
||||||
return getattr(app_ctx, self._app_context_attribute)
|
return getattr(app_ctx, self._app_context_attribute)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
|||||||
@@ -275,22 +275,22 @@ div.form.layout-expanded {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@each $type in $text-entry-inputs {
|
@each $type in $text-entry-inputs {
|
||||||
input[type=$type] {
|
input[type=#{$type}] {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border: none;
|
border: none;
|
||||||
border-bottom: $w-s4 solid $primary-500;
|
border-bottom: $w-s4 solid $primary-500;
|
||||||
margin-bottom: -$w-s4;
|
margin-bottom: -$w-s4;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type=$type].has-error {
|
input[type=#{$type}].has-error {
|
||||||
border-right: $w-s4 solid $alert-500;
|
border-right: $w-s4 solid $alert-500;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type=$type]:hover {
|
input[type=#{$type}]:hover {
|
||||||
border-bottom-color: $primary-700;
|
border-bottom-color: $primary-700;
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type=$type]:focus {
|
input[type=#{$type}]:focus {
|
||||||
border-bottom-color: $primary-800;
|
border-bottom-color: $primary-800;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -646,69 +646,6 @@ input[type="submit"], button, .button {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* button, .button {
|
|
||||||
margin: 0 $w-s2;
|
|
||||||
}
|
|
||||||
|
|
||||||
button.lv-primary, .button.lv-primary {
|
|
||||||
background-color: $gray-500;
|
|
||||||
color: $gray-900;
|
|
||||||
border-radius: $w-s4;
|
|
||||||
border: $w-s4 solid $gray-400;
|
|
||||||
|
|
||||||
@each $type, $values in $colours {
|
|
||||||
&.c-#{$type} {
|
|
||||||
border-color: nth($values, 4);
|
|
||||||
background-color: nth($values, 5);
|
|
||||||
color: nth($values, 9);
|
|
||||||
}
|
|
||||||
|
|
||||||
&.c-#{$type}:hover {
|
|
||||||
background-color: nth($values, 4);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
button.lv-secondary, .button.lv-secondary {
|
|
||||||
background-color: $gray-700;
|
|
||||||
color: $gray-100;
|
|
||||||
border-radius: $w-s4;
|
|
||||||
|
|
||||||
@each $type, $values in $colours {
|
|
||||||
&.c-#{$type} {
|
|
||||||
background-color: nth($values, 7);
|
|
||||||
color: nth($values, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
button.lv-tertiary, .button.lv-tertiary {
|
|
||||||
background-color: inherit;
|
|
||||||
color: $gray-300;
|
|
||||||
border-radius: $w-s4;
|
|
||||||
text-decoration: underline;
|
|
||||||
|
|
||||||
@each $type, $values in $colours {
|
|
||||||
&.c-#{$type} {
|
|
||||||
color: nth($values, 3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
button.lv-secondary.c-#{$type}, .button.lv-secondary.c-#{$type} {
|
|
||||||
background-color: nth($values, 7);
|
|
||||||
color: nth($values, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
button.lv-tertiary.c-#{$type}, .button.lv-tertiary.c-#{$type} {
|
|
||||||
color: nth($values, 3);
|
|
||||||
text-decoration: underline;
|
|
||||||
background-color: transparent;
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
/* boxes */
|
/* boxes */
|
||||||
|
|
||||||
.box {
|
.box {
|
||||||
@@ -1121,7 +1058,7 @@ pre.guru-meditation {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@each $type in $text-entry-inputs {
|
@each $type in $text-entry-inputs {
|
||||||
input[type=$type] {
|
input[type=#{$type}] {
|
||||||
background-color: black;
|
background-color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user