Skip to content

Commit d3f19ee

Browse files
committed
operations stuff:
fix constraints-kgs.txt add zodbpack configuration add relstorage-cache / blob-cache on zeoclient update relstorage pinning. set psycopg2 back to 2.9.5 in all cases, we can't overrride the version from from plone-backend:6.0.15 Add collective.casestudy for local dev. add sigterm handler by example from davisagli.
1 parent 947cfb3 commit d3f19ee

16 files changed

Lines changed: 184 additions & 49 deletions

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
## 1.0.21 (unreleased)
22

33

4+
- Update to Relstorage 4.2.1
5+
- Simplify and make mxdev config explicit
6+
- Add collective.casestudy to mxdev, pin 1.0.0b1 for testing/production.
7+
- Add zodbpack utility container.
8+
- Add maintenance scripts.
9+
- Add docs to use local filestorage, add make install for backend.
10+
- Deployment fixes for frontend, use newer linux base image for frontend.
11+
- Fix several frontend jsx template issues and warnings.
12+
- Updated Volto to 16.34.1
13+
414

515
## 1.0.20 (2025-06-25)
616

backend/Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,14 @@ LABEL maintainer="Plone Foundation <marketing@plone.org>" \
1111
COPY . .
1212

1313
# Install local requirements and fix permissions
14-
RUN sed "s/PLONE_VERSION/${PLONE_VERSION}/g" constraints-template.txt > constraints.txt
14+
RUN
1515

1616
RUN --mount=type=cache,id=ploneorg-pip,target=/root/.cache/pip \
17-
./bin/pip install mxdev \
17+
echo "-c https://dist.plone.org/release/${PLONE_VERSION}/constraints.txt" > constraints-kgs.txt \
18+
mkdir /data/relstorage-cache /data/blob-cache \
19+
&& ./bin/pip install mxdev \
1820
&& mv requirements-docker.txt requirements.txt \
1921
&& ./bin/mxdev -c mx.ini \
2022
&& ./bin/pip install -r requirements-mxdev.txt \
21-
&& chown -R plone: /app
23+
&& chown -R plone: /app \
24+
&& mv conf/relstorage.conf etc/relstorage.conf

backend/Dockerfile.maintenance

Lines changed: 0 additions & 23 deletions
This file was deleted.

backend/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ i18n: bin/i18ndude ## Update locales
118118
.PHONY: build-dev install
119119
build-dev: config ## pip install Plone packages
120120
@echo "$(GREEN)==> Setup Build$(RESET)"
121-
sed "s/PLONE_VERSION/$(PLONE_VERSION)/g" constraints-template.txt > constraints.txt
121+
echo "-c https://dist.plone.org/release/${PLONE_VERSION}/constraints.txt" > constraints-kgs.txt
122122
@bin/mxdev -c mx.ini
123123
bin/pip install -r requirements-mxdev.txt
124124
# Forward compatibility

backend/conf/relstorage.conf

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
%define INSTANCE /app
2+
instancehome $INSTANCE
3+
4+
%define CLIENTHOME $(CLIENT_HOME)
5+
clienthome $CLIENTHOME
6+
7+
debug-mode $(DEBUG_MODE)
8+
security-policy-implementation $(SECURITY_POLICY_IMPLEMENTATION)
9+
verbose-security $(VERBOSE_SECURITY)
10+
default-zpublisher-encoding $(DEFAULT_ZPUBLISHER_ENCODING)
11+
12+
<environment>
13+
CHAMELEON_CACHE $INSTANCE/var/cache
14+
</environment>
15+
16+
<dos_protection>
17+
form-memory-limit $(ZOPE_FORM_MEMORY_LIMIT)
18+
</dos_protection>
19+
20+
<zodb_db main>
21+
# Main database
22+
cache-size $(ZODB_CACHE_SIZE)
23+
%import relstorage
24+
<relstorage>
25+
name $(RELSTORAGE_NAME)
26+
read-only $(RELSTORAGE_READ_ONLY)
27+
keep-history $(RELSTORAGE_KEEP_HISTORY)
28+
commit-lock-timeout $(RELSTORAGE_COMMIT_LOCK_TIMEOUT)
29+
create-schema $(RELSTORAGE_CREATE_SCHEMA)
30+
blob-dir /data/blob-cache
31+
shared-blob-dir false
32+
blob-cache-size $(RELSTORAGE_BLOB_CACHE_SIZE)
33+
blob-cache-size-check $(RELSTORAGE_BLOB_CACHE_SIZE_CHECK)
34+
blob-cache-size-check-external $(RELSTORAGE_BLOB_CACHE_SIZE_CHECK_EXTERNAL)
35+
blob-chunk-size $(RELSTORAGE_BLOB_CHUNK_SIZE)
36+
cache-local-dir /data/relstorage-cache
37+
<postgresql>
38+
dsn $(RELSTORAGE_DSN)
39+
</postgresql>
40+
</relstorage>
41+
mount-point /
42+
</zodb_db>

backend/constraints-kgs.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-c https://dist.plone.org/release/6.0.15/constraints.txt

backend/constraints-template.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

backend/instance.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ default_context:
66
db_storage: relstorage
77
db_relstorage_postgresql_driver: psycopg2
88
db_relstorage_postgresql_dsn: dbname='ploneorg' user='ploneorg' host='127.0.0.1' password='ploneorg'
9+
db_relstorage_cache_local_mb: 30
910
db_blobs_mode: cache
11+
db_blob_cache_size: 5GB

backend/mx.ini

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,25 @@
44
; to learn more about mxdev visit https://pypi.org/project/mxdev/
55

66
[settings]
7-
; example how to override a package version
8-
; version-overrides =
9-
; example.package==2.1.0a2
7+
requirements-in = requirements.txt
8+
requirements-out = requirements-mxdev.txt
9+
constraints-out = constraints-mxdev.txt
10+
default-target = ./sources
11+
default-use = False
1012

11-
;version-overrides =
13+
gh_plone = https://github.com/plone
14+
gh_collective = https://github.com/collective
1215

1316
[plone.app.vulnerabilities]
14-
url = https://github.com/plone/plone.app.vulnerabilities.git
15-
pushurl = git@github.com:plone/plone.app.vulnerabilities.git
17+
url = ${settings:gh_plone}/plone.app.vulnerabilities.git
18+
pushurl = ${settings:gh_plone}/plone.app.vulnerabilities.git
1619
extras =
1720
branch = master
21+
use = True
1822

23+
[collective.casestudy]
24+
url = ${settings:gh_collective}/collective.casestudy.git
25+
pushurl = ${settings:gh_collective}/collective.casestudy.git
26+
extras =
27+
branch = main
28+
use = True

backend/requirements-docker.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
1-
-c constraints.txt
1+
# This is the requirements file used to build the Docker images for plone.org backend
2+
# Thes are the Known Good Set constraints downloaed from dist.plnone.org
3+
-c constraints-kgs.txt
24
-e src/ploneorg
35

4-
relstorage==4.0.0
5-
#Don't try to updaet psycopg2, it need libpq-dev installed to run, but we don't have that because we import
6+
relstorage==4.2.0
7+
#Don't try to update psycopg2, it need libpq-dev installed to run, but we don't have that because we import
68
#from plone-backend Docker image
79
#psycopg2==2.9.9
8-
collective.revisionmanager==1.2.2
10+
collective.revisionmanager==1.2.2
11+
collective.casestudy==1.0.0b1

0 commit comments

Comments
 (0)