PDM is a modern Python package manager, which can install Plone and it's dependencies and keep it consistent. I have setup an example repository everyone can use to setup Plone with PDM. It supports both simple standalone and RelStorage setups.
checkout this repository like this:
git clone https://github.com/collective/plone-classicui-pdm-installer.git plone6classicui
cd plone6classicui
creating a venv:
python3.11 -m venv venv
installing PDM with pip:
./venv/bin/pip install pdm
add needed Plone Add-on's in the pyproject.toml:
dependencies = [
"Products.CMFPlone>=6.0.4",
"plone.app.caching",
"plone.app.iterate",
"plone.app.upgrade",
"Products.CMFPlacefulWorkflow",
### only needed when using relstorage
"relstorage",
"psycopg2",
###
"collective.easyform",
"plone.gallery",
"collective.collectionfilter",
]
Install Plone and all dependencies:
./venv/bin/pdm install
Standalone setup
Create a Zope instance:
./venv/bin/pdm run create_instance
Adjust the instance port in instance1/etc/zope.ini
[server:main]
use = egg:waitress#main
host = 127.0.0.1
port = 8080
RelStorage setup
Alternatively you can also create a RelStorage setup like this:
./venv/bin/pdm run create_relstorage_instance
Adjust the data base connection string in instance1/etc/zope.conf:
<zodb_db main>
<relstorage>
blob-dir $INSTANCE/var/blobstorage
<postgresql>
dsn dbname='my_plone_database' user='my_plone_db_user' host='localhost' password='SECRET'
</postgresql>
</relstorage>
mount-point /
</zodb_db>
Start the instance
./venv/bin/pdm run start_instance
In production you want to add this to something like supervisor or a systemd script.