Skip to content

plone/plone.org

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.11
  • 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 instead of PostgreSQL, you can configure the backend to use direct filestorage.

Setup for filestorage development

  1. Create the data directory at the project root:

    mkdir data
  2. Configure the backend for filestorage by copying the example configuration:

    cp backend/instance-local.yaml.example backend/instance-local.yaml
  3. Install and start the backend as usual:

    make install
    make start-backend

The Makefile will automatically detect and use the instance-local.yaml file when it exists, switching the storage layer from relstorage/PostgreSQL to direct filestorage.

Getting data for development

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

About

Plone.org

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

 
 
 

Contributors 20