/contentpool

The contentpool distribution combines the publishing features of the Thunder distribution with powerful content API & replication features! https://www.drupal.org/project/contentpool

Primary LanguagePHPGNU General Public License v2.0GPL-2.0

Contentpool distribution

Build Status

The contentpool distribution combines the publishing features of the Thunder distribution with powerful content API & replication features! https://www.drupal.org/project/contentpool

Overview

This repository is the Drupal install profile for the distribution. You'll need a drupal project for installing it. Refer to "Installation" for details.

Status

The distribution is in early development stages, but basically working already. Stayed tuned!

Workflow, Issues

Please file issues the drupal.org issue tracker at https://www.drupal.org/project/issues/contentpool. For suggested code changes, please submit pull requests (PRs) to the respective github repo and link them from your drupal.org issue.

Installation

Quick installation

The distribution can be best tested by using the provided scripts to setup a new Drupal project using the distribution. Furthermore it comes with a ready-to-go docker-compose setup, so you can try the distribution. You'll need once project for the contentpool and one project for a satellite site that connects to the contentpool.

0. Prerequisites

1. Setup contentpool

Run the following commands:

# cd to ~/projects or similar.
git clone git@github.com:drunomics/contentpool.git && cd contentpool
# Check out tag of latest release or stay with the development version.
./scripts/create-project.sh
./scripts/run-server.sh
./scripts/init-project.sh

If all worked, you can access your site at http://contentpool-project.localdev.space The distribution comes with some basic demo content, which is already added in by the init-project script. The demo content is provided by the optional module contentpool_demo_content.

If you want to run drush commands, do so from inside the docker container. Run the following commands from a newly opened terminal:

cd ../contentpool-project
source dotenv/loader.sh && docker-compose exec web /bin/bash
drush uli

2. Setup satellite site:

Run the following commands:

# cd to ~/projects or similar.
git clone git@github.com:drunomics/contentpool-client.git && cd contentpool-client
# Check out tag of latest release or stay with the development version.
./scripts/create-project.sh
./scripts/run-server.sh
./scripts/init-project.sh

If all worked, you can access your site at http://satellite-project.localdev.space

If you want to run drush commands, do so from inside the docker container. Run the following commands from a newly opened terminal:

cd ../satellite-project
source dotenv/loader.sh && docker-compose exec web /bin/bash
drush uli

Refer to the usage documentation to trigger a first replication!

Regular installation

The install profile can be added to a Drupal 8 site via composer:

  composer require drunomics/contentpool

Then install Drupal with while selecting the "Contentpool" distribution. Note that only a composer based installation is supported. Start off with a composer-based Drupal project like drunomics/drupal-project.

Development

Just follow the above "Quick installation" instructions and edit the install profile content at web/profiles/contrib/contentpool. You can make sure it's a Git checkout by doing:

  rm -rf web/profiles/contrib/contentpool
  composer install --prefer-source

Running tests

Locally, via provided scripts

After installation with the provided scripts (see above) you can just launch the tests as the following:

 ./scripts/create-project.sh
 ./scripts/run-server.sh
 ./scripts/init-project.sh
 ./scripts/run-tests.sh

Manually

Based upon the manual installation instructions you can launch tests as follows:

source dotenv/loader.sh
# Launch tests inside a docker container, so name resolution works thanks to
# docker host aliases and the PHP environment is controlled by the container.
docker-compose exec web ./web/profiles/contrib/contentpool/tests/behat/run.sh

Credits