Skip to content

Commit 633da6d

Browse files
committed
fix files
1 parent f5bdf1a commit 633da6d

File tree

19 files changed

+119
-121
lines changed

19 files changed

+119
-121
lines changed

.github/workflows/main.yml

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
name: Blocks listing CI
1+
name: Search blocks CI
22

33
on:
44
push:
55
paths:
6-
- "backend/**"
7-
- "frontend/**"
8-
- ".github/workflows/backend.yml"
9-
- "docs/**"
10-
- ".github/workflows/docs.yml"
6+
- 'backend/**'
7+
- 'frontend/**'
8+
- '.github/workflows/backend.yml'
9+
- 'docs/**'
10+
- '.github/workflows/docs.yml'
1111
- .readthedocs.yaml
12-
- ".github/workflows/frontend.yml"
13-
- ".github/workflows/main.yml"
14-
- "devops/**"
12+
- '.github/workflows/frontend.yml'
13+
- '.github/workflows/main.yml'
14+
- 'devops/**'
1515
workflow_dispatch:
1616

1717
env:
18-
IMAGE_NAME_PREFIX: ghcr.io/collective/collective-blockslisting
19-
NODE_VERSION: "22.x"
20-
PYTHON_VERSION: "3.12"
18+
IMAGE_NAME_PREFIX: ghcr.io/collective/collective-searchblocks
19+
NODE_VERSION: '22.x'
20+
PYTHON_VERSION: '3.12'
2121

2222
jobs:
2323
config:
@@ -70,13 +70,13 @@ jobs:
7070
backend:
7171
uses: ./.github/workflows/backend.yml
7272
needs:
73-
- config
73+
- config
7474
with:
75-
base-tag: ${{ needs.config.outputs.BASE_TAG }}
76-
image-name-prefix: ${{ needs.config.outputs.IMAGE_NAME_PREFIX }}
77-
image-name-suffix: backend
78-
python-version: ${{ needs.config.outputs.PYTHON_VERSION }}
79-
plone-version: ${{ needs.config.outputs.PLONE_VERSION }}
75+
base-tag: ${{ needs.config.outputs.BASE_TAG }}
76+
image-name-prefix: ${{ needs.config.outputs.IMAGE_NAME_PREFIX }}
77+
image-name-suffix: backend
78+
python-version: ${{ needs.config.outputs.PYTHON_VERSION }}
79+
plone-version: ${{ needs.config.outputs.PLONE_VERSION }}
8080
if: ${{ needs.config.outputs.backend == 'true' }}
8181
permissions:
8282
contents: read
@@ -85,28 +85,28 @@ jobs:
8585
docs:
8686
uses: ./.github/workflows/docs.yml
8787
needs:
88-
- config
88+
- config
8989
with:
90-
python-version: ${{ needs.config.outputs.PYTHON_VERSION }}
90+
python-version: ${{ needs.config.outputs.PYTHON_VERSION }}
9191
if: ${{ needs.config.outputs.docs == 'true' }}
9292

9393
frontend:
9494
uses: ./.github/workflows/frontend.yml
9595
needs:
96-
- config
96+
- config
9797
with:
98-
base-tag: ${{ needs.config.outputs.BASE_TAG }}
99-
image-name-prefix: ${{ needs.config.outputs.IMAGE_NAME_PREFIX }}
100-
image-name-suffix: frontend
101-
node-version: ${{ needs.config.outputs.NODE_VERSION }}
102-
volto-version: ${{ needs.config.outputs.VOLTO_VERSION }}
98+
base-tag: ${{ needs.config.outputs.BASE_TAG }}
99+
image-name-prefix: ${{ needs.config.outputs.IMAGE_NAME_PREFIX }}
100+
image-name-suffix: frontend
101+
node-version: ${{ needs.config.outputs.NODE_VERSION }}
102+
volto-version: ${{ needs.config.outputs.VOLTO_VERSION }}
103103
if: ${{ needs.config.outputs.frontend == 'true' }}
104104
permissions:
105105
contents: read
106106
packages: write
107107

108108
report:
109-
name: "Final report"
109+
name: 'Final report'
110110
if: ${{ always() }}
111111
runs-on: ubuntu-latest
112112
needs:

.github/workflows/manual_deploy.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
name: Manual Deployment of collective-blockslisting.example.com
1+
name: Manual Deployment of collective-searchblocks.example.com
22

33
on:
44
workflow_dispatch:
55

6-
76
jobs:
8-
97
meta:
108
runs-on: ubuntu-latest
119
outputs:
@@ -35,7 +33,7 @@ jobs:
3533
- name: Deploy to cluster
3634
uses: kitconcept/docker-stack-deploy@v1.2.0
3735
with:
38-
registry: "ghcr.io"
36+
registry: 'ghcr.io'
3937
username: ${{ github.actor }}
4038
password: ${{ secrets.GITHUB_TOKEN }}
4139
remote_host: ${{ secrets.DEPLOY_HOST }}

Makefile

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ MAKEFLAGS+=--no-builtin-rules
1111
CURRENT_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
1212
GIT_FOLDER=$(CURRENT_DIR)/.git
1313

14-
PROJECT_NAME=collective-blockslisting
15-
STACK_NAME=collective-blockslisting-example-com
14+
PROJECT_NAME=collective-searchblocks
15+
STACK_NAME=collective-searchblocks-example-com
1616

1717
VOLTO_VERSION=$(shell cat frontend/mrs.developer.json | python -c "import sys, json; print(json.load(sys.stdin)['core']['tag'])")
1818
PLONE_VERSION=$(shell cat backend/version.txt)
@@ -152,7 +152,7 @@ stack-create-site: ## Local Stack: Create a new site
152152
stack-start: ## Local Stack: Start Services
153153
@echo "Start local Docker stack"
154154
VOLTO_VERSION=$(VOLTO_VERSION) PLONE_VERSION=$(PLONE_VERSION) docker compose -f docker-compose.yml up -d --build
155-
@echo "Now visit: http://collective-blockslisting.localhost"
155+
@echo "Now visit: http://collective-searchblocks.localhost"
156156

157157
.PHONY: stack-status
158158
stack-status: ## Local Stack: Check Status
@@ -193,12 +193,12 @@ acceptance-test:
193193
.PHONY: acceptance-frontend-image-build
194194
acceptance-frontend-image-build:
195195
@echo "Build acceptance frontend image"
196-
@docker build frontend -t collective/collective-blockslisting-frontend:acceptance -f frontend/Dockerfile --build-arg VOLTO_VERSION=$(VOLTO_VERSION)
196+
@docker build frontend -t collective/collective-searchblocks-frontend:acceptance -f frontend/Dockerfile --build-arg VOLTO_VERSION=$(VOLTO_VERSION)
197197

198198
.PHONY: acceptance-backend-image-build
199199
acceptance-backend-image-build:
200200
@echo "Build acceptance backend image"
201-
@docker build backend -t collective/collective-blockslisting-backend:acceptance -f backend/Dockerfile.acceptance --build-arg PLONE_VERSION=$(PLONE_VERSION)
201+
@docker build backend -t collective/collective-searchblocks-backend:acceptance -f backend/Dockerfile.acceptance --build-arg PLONE_VERSION=$(PLONE_VERSION)
202202

203203
.PHONY: acceptance-images-build
204204
acceptance-images-build: ## Build Acceptance frontend/backend images
@@ -208,12 +208,12 @@ acceptance-images-build: ## Build Acceptance frontend/backend images
208208
.PHONY: acceptance-frontend-container-start
209209
acceptance-frontend-container-start:
210210
@echo "Start acceptance frontend"
211-
@docker run --rm -p 3000:3000 --name collective-blockslisting-frontend-acceptance --link collective-blockslisting-backend-acceptance:backend -e RAZZLE_API_PATH=http://localhost:55001/plone -e RAZZLE_INTERNAL_API_PATH=http://backend:55001/plone -d collective/collective-blockslisting-frontend:acceptance
211+
@docker run --rm -p 3000:3000 --name collective-searchblocks-frontend-acceptance --link collective-searchblocks-backend-acceptance:backend -e RAZZLE_API_PATH=http://localhost:55001/plone -e RAZZLE_INTERNAL_API_PATH=http://backend:55001/plone -d collective/collective-searchblocks-frontend:acceptance
212212

213213
.PHONY: acceptance-backend-container-start
214214
acceptance-backend-container-start:
215215
@echo "Start acceptance backend"
216-
@docker run --rm -p 55001:55001 --name collective-blockslisting-backend-acceptance -d collective/collective-blockslisting-backend:acceptance
216+
@docker run --rm -p 55001:55001 --name collective-searchblocks-backend-acceptance -d collective/collective-searchblocks-backend:acceptance
217217

218218
.PHONY: acceptance-containers-start
219219
acceptance-containers-start: ## Start Acceptance containers
@@ -223,8 +223,8 @@ acceptance-containers-start: ## Start Acceptance containers
223223
.PHONY: acceptance-containers-stop
224224
acceptance-containers-stop: ## Stop Acceptance containers
225225
@echo "Stop acceptance containers"
226-
@docker stop collective-blockslisting-frontend-acceptance
227-
@docker stop collective-blockslisting-backend-acceptance
226+
@docker stop collective-searchblocks-frontend-acceptance
227+
@docker stop collective-searchblocks-backend-acceptance
228228

229229
.PHONY: ci-acceptance-test
230230
ci-acceptance-test:

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Blocks listing 🚀
1+
# Search blocks 🚀
22

33
[![Built with Cookieplone](https://img.shields.io/badge/built%20with-Cookieplone-0083be.svg?logo=cookiecutter)](https://github.com/plone/cookieplone-templates/)
44
[![Black code style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
5-
[![CI](https://github.com/collective/collective-blockslisting/actions/workflows/main.yml/badge.svg)](https://github.com/collective/collective-blockslisting/actions/workflows/main.yml)
5+
[![CI](https://github.com/collective/collective-searchblocks/actions/workflows/main.yml/badge.svg)](https://github.com/collective/collective-searchblocks/actions/workflows/main.yml)
66

77
A comprehensive solution for searching and managing content that uses specific blocks in Plone and Volto.
88

@@ -33,8 +33,8 @@ A comprehensive solution for searching and managing content that uses specific b
3333
1. Clone this repository, then change your working directory.
3434

3535
```shell
36-
git clone git@github.com:collective/collective-blockslisting.git
37-
cd collective-blockslisting
36+
git clone git@github.com:collective/collective-searchblocks.git
37+
cd collective-searchblocks
3838
```
3939

4040
2. Install this code base.
@@ -72,7 +72,7 @@ Deploy a local Docker Compose environment that includes the following.
7272

7373
- Docker images for Backend and Frontend 🖼️
7474
- A stack with a Traefik router and a PostgreSQL database 🗃️
75-
- Accessible at [http://collective-blockslisting.localhost](http://collective-blockslisting.localhost) 🌐
75+
- Accessible at [http://collective-searchblocks.localhost](http://collective-searchblocks.localhost) 🌐
7676

7777
Run the following commands in a shell session.
7878

@@ -87,7 +87,7 @@ And... you're all set! Your Plone site is up and running locally! 🚀
8787
8888
This monorepo consists of the following distinct sections:
8989
90-
- **backend**: Houses the API and Plone installation, utilizing pip instead of buildout, and includes a policy package named collective.blockslisting.
90+
- **backend**: Houses the API and Plone installation, utilizing pip instead of buildout, and includes a policy package named collective.searchblocks.
9191
- **frontend**: Contains the React (Volto) package.
9292
- **devops**: Encompasses Docker stack, Ansible playbooks, and cache settings.
9393
- **docs**: Scaffold for writing documentation for your project.

devops/README-GHA.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ Welcome to the DevOps operations guide for deploying your project using GitHub A
99
### Step 1: Create a New Environment
1010

1111
1. Visit [GitHub](https://github.com/) and log in with your credentials.
12-
2. Go to your repository at [collective/collective-blockslisting](https://github.com/collective/collective-blockslisting).
12+
2. Go to your repository at [collective/collective-searchblocks](https://github.com/collective/collective-searchblocks).
1313
3. Click on `Settings` at the top-right corner.
1414
4. In the left sidebar, click on `Environments`.
1515
5. Press `New environment`.
16-
6. Name the environment `collective-blockslisting.example.com` and hit `Configure environment`.
16+
6. Name the environment `collective-searchblocks.example.com` and hit `Configure environment`.
1717

1818
### Step 2: Add Environment Secrets 🔒
1919

@@ -24,7 +24,7 @@ After setting up the environment, it's time to add secrets. These are sensitive
2424

2525
| Secret Name | Secret Value | Description |
2626
|-------------|--------------|-------------|
27-
| DEPLOY_HOST | collective-blockslisting.example.com | The hostname or IP address of your Docker Swarm manager. |
27+
| DEPLOY_HOST | collective-searchblocks.example.com | The hostname or IP address of your Docker Swarm manager. |
2828
| DEPLOY_PORT | 22 | The SSHD Port. |
2929
| DEPLOY_USER | plone | The user to connect to the deploy host, with permissions to run Docker commands. |
3030
| DEPLOY_SSH | Contents of `devops/etc/keys/plone_prod_deploy_ed25519` | The private SSH key used for connection. The corresponding public key should be in the `~/.ssh/authorized_keys` file of the deployment user. |
@@ -40,30 +40,30 @@ Add the repository variable as follows:
4040

4141
| Name | Value |
4242
|----------|-------|
43-
| LIVE_ENV | collective-blockslisting.example.com |
43+
| LIVE_ENV | collective-searchblocks.example.com |
4444

4545
This variable is referenced in the `.github/workflows/manual_deploy.yml` file.
4646

4747
## Manual Deployment 🚀
4848

4949
Ensure that both Backend and Frontend tests have been successfully executed:
5050

51-
- [Backend Tests Workflow](https://github.com/collective/collective-blockslisting/actions/workflows/backend.yml)
52-
- [Frontend Tests Workflow](https://github.com/collective/collective-blockslisting/actions/workflows/frontend.yml)
51+
- [Backend Tests Workflow](https://github.com/collective/collective-searchblocks/actions/workflows/backend.yml)
52+
- [Frontend Tests Workflow](https://github.com/collective/collective-searchblocks/actions/workflows/frontend.yml)
5353

54-
Upon successful completion of the tests, Docker images for the Backend (`ghcr.io/collective/collective-blockslisting-backend`) and Frontend (`ghcr.io/collective/collective-blockslisting-frontend`) will be available.
54+
Upon successful completion of the tests, Docker images for the Backend (`ghcr.io/collective/collective-searchblocks-backend`) and Frontend (`ghcr.io/collective/collective-searchblocks-frontend`) will be available.
5555

5656
### Initiating Manual Deployment
5757

58-
1. Navigate to [Manual Deployment of collective-blockslisting.example.com](https://github.com/collective/collective-blockslisting/actions/workflows/manual-deploy.yml).
58+
1. Navigate to [Manual Deployment of collective-searchblocks.example.com](https://github.com/collective/collective-searchblocks/actions/workflows/manual-deploy.yml).
5959
2. Click on `Run workflow`.
6060
3. Select `Branch: main` under **Use workflow from**.
6161
4. Press `Run workflow`.
6262

6363
The workflow will execute the following actions:
6464

6565
- Connect to **DEPLOY_HOST** using **DEPLOY_USER** and **DEPLOY_SSH** key.
66-
- Initiate a new deployment using the `devops/stacks/collective-blockslisting.example.com.yml` stack.
66+
- Initiate a new deployment using the `devops/stacks/collective-searchblocks.example.com.yml` stack.
6767
- Provide a detailed report of the deployment outcome.
6868

6969
Congratulations! 🎉 You've successfully configured and initiated a manual deployment using GitHub Actions. Monitor the workflow for real-time updates on the deployment process.

devops/README-GITLAB.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ See [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/).
1111
### Step 1: Add the deployment environment variables
1212

1313
1. Visit [GitLab](https://gitlab.com/), or your organization's GitLab instance, and log in with your credentials.
14-
2. Go to your repository at [collective/collective-blockslisting](https://gitlab.com/collective/collective-blockslisting).
14+
2. Go to your repository at [collective/collective-searchblocks](https://gitlab.com/collective/collective-searchblocks).
1515
Note that you might need to adjust the URL's host name to your organization's.
1616
3. Click on `Settings` at the left menu and select `CI/CD`.
1717
4. Expand the `Variables`.

devops/stacks/collective-blockslisting.example.com.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ services:
2525
### echo $(htpasswd -nb user password) | sed -e s/\\$/\\$\\$/g
2626
### Defaults to admin:admin
2727
#- traefik.http.middlewares.admin-auth.basicauth.users=admin:$$apr1$$uZPT5Fgu$$AmlIdamxT5ipBvPlsdfD70
28-
#- traefik.http.routers.traefik-public-https.rule=Host(`traefik-collective-blockslisting.example.com`)
28+
#- traefik.http.routers.traefik-public-https.rule=Host(`traefik-collective-searchblocks.example.com`)
2929
#- traefik.http.routers.traefik-public-https.entrypoints=https
3030
#- traefik.http.routers.traefik-public-https.tls=true
3131
#- traefik.http.routers.traefik-public-https.service=api@internal
@@ -52,7 +52,7 @@ services:
5252
- --providers.docker.constraints=Label(`traefik.constraint-label`, `public`)
5353
- --providers.docker.exposedbydefault=false
5454
- --providers.docker.swarmmode
55-
- --providers.docker.network=collective-blockslisting-example-com_nw-internal
55+
- --providers.docker.network=collective-searchblocks-example-com_nw-internal
5656
- --entrypoints.http.address=:80
5757
- --entrypoints.https.address=:443
5858
- --certificatesresolvers.le.acme.email=sviluppo@redturtle.it
@@ -68,10 +68,10 @@ services:
6868
- nw-internal
6969

7070
frontend:
71-
image: ghcr.io/collective/collective-blockslisting-frontend:${STACK_PARAM:-latest}
71+
image: ghcr.io/collective/collective-searchblocks-frontend:${STACK_PARAM:-latest}
7272
environment:
7373
RAZZLE_INTERNAL_API_PATH: http://backend:8080/Plone
74-
RAZZLE_API_PATH: https://collective-blockslisting.example.com
74+
RAZZLE_API_PATH: https://collective-searchblocks.example.com
7575
depends_on:
7676
- backend
7777
networks:
@@ -90,15 +90,15 @@ services:
9090
- traefik.http.services.svc-frontend.loadbalancer.server.port=3000
9191
# Routers
9292
## /
93-
- traefik.http.routers.rt-frontend.rule=Host(`collective-blockslisting.example.com`)
93+
- traefik.http.routers.rt-frontend.rule=Host(`collective-searchblocks.example.com`)
9494
- traefik.http.routers.rt-frontend.entrypoints=https
9595
- traefik.http.routers.rt-frontend.tls=true
9696
- traefik.http.routers.rt-frontend.tls.certresolver=le
9797
- traefik.http.routers.rt-frontend.service=svc-frontend
9898
- traefik.http.routers.rt-frontend.middlewares=gzip
9999

100100
backend:
101-
image: ghcr.io/collective/collective-blockslisting-backend:${STACK_PARAM:-latest}
101+
image: ghcr.io/collective/collective-searchblocks-backend:${STACK_PARAM:-latest}
102102
environment:
103103
RELSTORAGE_DSN: "dbname='${DB_NAME:-plone}' user='${DB_USER:-plone}' host='${DB_HOST:-db}' password='${DB_PASSWORD:-cInYVdqIftBC}' port='${DB_PORT:-5432}'"
104104
depends_on:
@@ -120,10 +120,10 @@ services:
120120
# Middlewares
121121
## VHM rewrite /++api++/
122122
- "traefik.http.middlewares.mw-backend-vhm-api.replacepathregex.regex=^/\\+\\+api\\+\\+($$|/.*)"
123-
- "traefik.http.middlewares.mw-backend-vhm-api.replacepathregex.replacement=/VirtualHostBase/https/collective-blockslisting.example.com/Plone/++api++/VirtualHostRoot$$1"
123+
- 'traefik.http.middlewares.mw-backend-vhm-api.replacepathregex.replacement=/VirtualHostBase/https/collective-searchblocks.example.com/Plone/++api++/VirtualHostRoot$$1'
124124
## VHM rewrite /ClassicUI/
125-
- "traefik.http.middlewares.mw-backend-vhm-classic.replacepathregex.regex=^/ClassicUI($$|/.*)"
126-
- "traefik.http.middlewares.mw-backend-vhm-classic.replacepathregex.replacement=/VirtualHostBase/https/collective-blockslisting.example.com/Plone/VirtualHostRoot/_vh_ClassicUI$$1"
125+
- 'traefik.http.middlewares.mw-backend-vhm-classic.replacepathregex.regex=^/ClassicUI($$|/.*)'
126+
- 'traefik.http.middlewares.mw-backend-vhm-classic.replacepathregex.replacement=/VirtualHostBase/https/collective-searchblocks.example.com/Plone/VirtualHostRoot/_vh_ClassicUI$$1'
127127
## Basic Authentication
128128
### Note: all dollar signs in the hash need to be doubled for escaping.
129129
### To create user:password pair, it's possible to use this command:
@@ -134,13 +134,13 @@ services:
134134

135135
# Routes
136136
## /++api++
137-
- traefik.http.routers.rt-backend-api.rule=Host(`collective-blockslisting.example.com`) && PathPrefix(`/++api++`)
137+
- traefik.http.routers.rt-backend-api.rule=Host(`collective-searchblocks.example.com`) && PathPrefix(`/++api++`)
138138
- traefik.http.routers.rt-backend-api.entrypoints=https
139139
- traefik.http.routers.rt-backend-api.tls=true
140140
- traefik.http.routers.rt-backend-api.service=svc-backend
141141
- traefik.http.routers.rt-backend-api.middlewares=gzip,mw-backend-vhm-api
142142
## /ClassicUI
143-
- traefik.http.routers.rt-backend-classic.rule=Host(`collective-blockslisting.example.com`) && PathPrefix(`/ClassicUI`)
143+
- traefik.http.routers.rt-backend-classic.rule=Host(`collective-searchblocks.example.com`) && PathPrefix(`/ClassicUI`)
144144
- traefik.http.routers.rt-backend-classic.entrypoints=https
145145
- traefik.http.routers.rt-backend-classic.tls=true
146146
- traefik.http.routers.rt-backend-classic.service=svc-backend
@@ -168,7 +168,7 @@ volumes:
168168
vol-site-data:
169169
driver_opts:
170170
type: none
171-
device: "/srv/collective-blockslisting/data"
171+
device: '/srv/collective-searchblocks/data'
172172
o: bind
173173

174174
networks:

0 commit comments

Comments
 (0)