Skip to content

plone/plone.org

Repository files navigation

Plone.org Site

Built with Cookiecutter Plone Starter Code analysis Backend testing.plone.org CI and Deploy Frontend testing.plone.org CI and deploy

The main destination for Plone

Quick start

Development Setup

  • Python 3.10
  • Node 16
  • yarn
  • Docker
  • Postgres 14

Create database

createdb ploneorg
createuser ploneorg

Install

git clone [email protected]:plone/plone.org.git
cd plone.org
make install

Start

Start the Backend (http://localhost:8080/)

make start-backend

Start the Frontend (http://localhost:3000/)

make start-frontend

Structure

This monorepo is composed by two distinct codebases: backend and frontend.

  • backend: API (Backend) Plone installation using pip (not buildout). Includes a policy package named ploneorg
  • frontend: React (Volto) package named frontend

Reasoning

  • Repo contains all codebase needed to run the site (excluding existing addons for Plone and React).
  • Github Workflows are triggered based on changes on each codebase (see .github/workflows)
  • Easier to create Docker images for each codebase
  • Showcase Plone installation/setup without buildout

Linters and Formatting

There are some hooks to run lint checks on the code. If you want to automatically format them, you can run

make format

in the root folder or especifically in each backend or frontend folders.

Linters commands are available in each backend and frontend folder.

Acceptance tests

There are Makefile commands in place:

build-test-acceptance-server: Build Acceptance Backend Server Docker image that it's being used afterwards. Must be run before running the tests, if the backend code has changed.

start-test-acceptance-server: Start server fixture in docker (previous build required)

start-test-acceptance-frontend: Start the Core Acceptance Frontend Fixture in dev mode

test-acceptance: Start Core Cypress Acceptance Tests in dev mode

Filestorage based backend alternative

The default setup assumes for local development you also have a PostgreSQL server running. As a convenience an example docker compose file is provided in the project root for such a service. If you prefer to use filestorage, you can look in the backend directory its Makefile and look at the alternative 'build-dev-fs' target, which depends on 'config-fs'. The difference with the normal 'config' target is the usages of instance-filestorage.yaml instead of instanc.yaml. These files are used as input for the application server scaffolding and switch the storage layer to either relstorage/postgresql or direct/filestorage.

For both storages, if you want to develop for plone.org and need a copy of the data, you will need to as another community member (preferably from the website-team or the AI-team) for a database dump.

Credits

This was generated by cookiecutter-plone-starter on 2022-10-14 12:14:12