Skip to content
netis-cmsPublic

About

💡 Installer for creating a Netis CMS project.

Topics

Resources

Stars

5 stars

Watchers

2 watching

Forks

Latest commit

 

History

790 Commits

Folders and files

Repository files navigation

Netis CMS

Installer for creating a Netis CMS project on top of Drago Project.

Integration Coding Style PHP version

Requirements

  • PHP >= 8.3
  • Composer

Installation

composer global require netis-cms/netis:dev-main

Usage

Create a new project:

create-netis cms

With permissions (the administration menu by privileges, write buttons, roles from the database, project-preset-permission):

create-netis cms --permission

Without an argument, the default target directory is netis:

create-netis

You can also install into the current empty directory:

create-netis .

For local testing from this repository:

php bin/create-netis cms

What It Does

The command creates a base Drago project, installs the Netis preset packages, copies project resources, cleans vendor resource folders and runs the package commands (e.g. the permission providers of the installed packages):

composer create-project drago-ex/project <target-dir> --no-scripts
composer require --no-scripts <netis-packages>   # project-preset, project-install (+ project-preset-permission with --permission)
php vendor/bin/drago-install
php vendor/bin/drago-clean
php vendor/bin/drago-commands

It also adds drago-commands to the Composer scripts of the project, so packages installed later get their permission providers on composer update. The migrations are run by the web installer.

Integration Test

The Integration workflow creates a project with create-netis, runs the migrations, PHPStan and the asset build, then sets the project up as the web installer does and checks the front page, the sign-in of an administrator and the administration. It saves a static page, a blog article and the roles of a user through their forms and checks their columns in the database, the edit form and the front pages, because the camelCase properties of entities and forms are mapped to snake_case columns. It runs on every push, daily and on demand, with the released packages and with the main branches of all drago-ex packages (the check before a release), each without and with --permission (VARIANT=base|permission, default permission).

Locally, with a MySQL or MariaDB database:

MODE=main DB_PORT=3306 bash .github/integration/run.sh

With PACKAGES_DIR pointing to a directory with the drago-ex packages cloned, MODE=main takes them from there instead of cloning the main branches, so changes that are not pushed yet are checked too.

Releasing Packages

For maintainers with the drago-ex packages cloned next to this repository:

node netis/tools/release.mjs              # what needs a release, in which order and version
node netis/tools/release.mjs --publish    # release it
node netis/tools/release.mjs --publish --wave   # release only the first wave

Choose a version with package=major|minor|patch|X.Y.Z, and leave out packages whose changes need no release yet (e.g. only doc comments) with --skip=package,other; repeat it with --publish. Release notes are drafted from the commits into temp/release-notes/, where you can edit them before publishing. Publishing checks that each package is committed, pushed and green in CI, and waits for Packagist between dependent packages.

CI of a package is red while it requires versions of other packages that are not released yet, so such a plan is released in waves (the plan shows the wave of each package). --wave releases only the packages whose drago-ex dependencies are released already, waits for Packagist and runs CI of the next wave again; once it is green, run the same command again.

project-preset-permission ships copies of the blog, static-page and gallery administration components with their permission steps done. After such a file changes in its package, copy them again:

php netis/tools/preset-permission.php

After Create

Go to the created project directory:

cd cms

Install frontend dependencies:

npm install

Build frontend assets:

npm run vite:build

Build Docker images:

npm run docker:build

Start the development Docker environment:

npm run docker:dev

All available npm commands are listed in the created project's package.json.

About

💡 Installer for creating a Netis CMS project.

Topics

Resources

Stars

5 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages