Skip to content

Commit

Permalink
refactor: remove magnolia module
Browse files Browse the repository at this point in the history
  • Loading branch information
arnediekmann committed Jun 18, 2024
1 parent 4fe9ea1 commit 8faca97
Show file tree
Hide file tree
Showing 29 changed files with 3 additions and 1,423 deletions.
21 changes: 0 additions & 21 deletions .github/workflows/publish-mvn-package.yaml

This file was deleted.

67 changes: 3 additions & 64 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ In case we don't want to operate the delivery tier ourselves and instead use a C
For the content management tier we provide two submodules which together with a queue handle the propagation of content change events:

1. [Paperboy push service](./paperboy-push-service): A small HTTP service that can be used as a webhook.
2. [Paperboy Magnolia module](./paperboy-magolia-module): A module that integrates directly into Magnolia and sends HTTP messages to the push service (or an arbitrary webhook) whenever a change in a watched workspace occurs.

The subscriber part of this system is currently comprised of three submodules in this repository:
The subscriber part of this system is currently comprised of two submodules in this repository:

1. [Paperboy Core](./paperboy-core): The core library which handles all generic configuration and knows how to execute the commands to trigger rebuilds.
2. [Paperboy CLI](./paperboy-cli): A simple CLI to ease usage and setup
Expand All @@ -51,11 +50,7 @@ $ curl -X POST \
-d 'payload=%7B%22foo%22%3A%22bar%22%7D&source=foo'
```

## Installation

To get started with your project, execute the stepts in [Frontend Set-Up](#frontend-set-up) and [Magnolia Set-Up](#magnolia-set-up). Afterwards either execute the steps from [Custom delivery layer](#custom-delivery-layer) or [Netlify](#netlify) depending on your setup.

### Frontend Set-Up
### Set-Up

To use Paperboy in your Frontend you can simply install the CLI globally via:

Expand All @@ -69,44 +64,12 @@ In case that you are writing the frontend with JavaScript you can also install t
$ npm i --save-dev @neoskop/paperboy-cli
```

### Magnolia Set-Up

Generate a blank Magnolia project using Magnolia's archetype catalog:

```bash
$ mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -DarchetypeCatalog=https://nexus.magnolia-cms.com/content/groups/public/ \
-Dfilter=info.magnolia.maven.archetypes:magnolia-project-archetype
```

Afterwards add the Paperboy Magnolia Module to the webapp's POM.xml:

```xml
<dependency>
<groupId>de.neoskop.magnolia</groupId>
<artifactId>paperboy</artifactId>
<version>2.0.0</version>
</dependency>
```

Build the WAR and deploy it in a servlet container.

### Custom delivery layer

In case of a custom deliver layer, start the push service and a NATS server by running the following command in the root folder of this repository:
Start the push service and a NATS server by running the following command in the root folder of this repository:

```bash
$ docker-compose up
```

When the containers are up and running, import the following config into Magnolia's configuration under `/modules/paperboy/config`:

```yaml
webhookConfig:
authorization: BEARER_TOKEN
bearerToken: supersecret
url: http://push-service:8080/
```
To configure the frontend, create a file called `paperboy.config.json` with the following contents:

```json
Expand All @@ -124,30 +87,6 @@ Finally change to the frontend directory and run:
$ paperboy start
```

### Netlify

To trigger a rebuild of the frontend whenever a change in Magnolia's content occurs, create a webhook in Netlify under `Settings > Build & Deploy` in your project.

Click "Add build hook":

![Webhook Creation pt. 1](images/netlify-webhook-01.png)

Give the hook a meaningful name and press "Save":

![Webhook Creation pt. 2](images/netlify-webhook-02.png)

Copy the webhook's URL:

![Webhook Creation pt. 2](images/netlify-webhook-03.png)

Finally import the following config into Magnolia's configuration under `/modules/paperboy/config`:

```yaml
webhookConfig:
authorization: NONE
url: https://api.netlify.com/build_hooks/<webhook-id>
```

## License

This project is under the terms of the Apache License, Version 2.0. A [copy of this license](LICENSE) is included with the sources.
8 changes: 0 additions & 8 deletions paperboy-magnolia-module/.gitignore

This file was deleted.

183 changes: 0 additions & 183 deletions paperboy-magnolia-module/pom.xml

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 8faca97

Please sign in to comment.