Roadiz

Roadiz是一种基于node 系统的现代CMS,可以处理多种类型的服务。(Roadiz is a modern CMS based on a node system which can handle many types of services.)

Github stars Tracking Chart

Roadiz是一种基于多态 node 系统的现代CMS,可以处理多种类型的服务和内容。 基于Symfony组件和Doctrine ORM,它允许您从头开始创建数据模式,并根据需要组织内容。

其后台开发具有高度的设计意识和用户体验。 其主题系统建立独立于后台,允许轻松切换和多个主题为一个内容基础。 例如,它允许您为桌面网站创建一个主题,并为您的移动设备创建一个主题,并使用相同的节点层次结构。 Roadiz是根据MIT的许可证发布的,所以您可以重新使用和分发个人和商业项目的代码。

# Create a new Roadiz projectcomposer create-project roadiz/standard-edition# Create a new theme for your projectcd standard-editionbin/roadiz themes:generate FooBar

Roadiz Standard Edition CMS(标准版) —— 这是Roadiz的生产版本。 这意味着将您的 Apache/Nginx 服务器根目录设置为 Web/文件夹,保持您的应用程序源和主题的安全。

Overview

Name With Ownerroadiz/standard-edition
Primary LanguageDockerfile
Program languagePHP (Language Count: 5)
Platform
License:
Release Count37
Last Release Name1.7.0 (Posted on 2021-09-22 16:58:23)
First Release Namepre-release1 (Posted on 2017-03-13 16:18:25)
Created At2017-01-26 03:03:45
Pushed At2021-09-22 14:58:36
Last Commit At2021-09-22 16:58:22
Stargazers Count35
Watchers Count11
Fork Count5
Commits Count360
Has Issues Enabled
Issues Count0
Issue Open Count0
Pull Requests Count0
Pull Requests Open Count0
Pull Requests Close Count0
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

Roadiz Standard Edition CMS

Join the chat at https://gitter.im/roadiz/roadiz

Roadiz is a modern CMS based on a polymorphic node system which can handle many types of services and contents.
Its back-office has been developed with a high sense of design and user experience.
Its theming system is built to live independently from back-office allowing easy switching
and multiple themes for one content basis. For example, it allows you to create one theme
for your desktop website and another one for your mobile, using the same node hierarchy.
Roadiz is released under MIT license, so you can reuse
and distribute its code for personal and commercial projects.

Documentation

Standard edition

This is the production-ready edition for Roadiz. It is meant to setup your Apache/Nginx server root to the web/ folder, keeping your app sources and themes secure.

Usage

# Create a new Roadiz project on develop branch
composer create-project roadiz/standard-edition;
# Navigate into your project dir
cd standard-edition;
# Create a new theme for your project
bin/roadiz themes:generate --symlink --relative FooBar;

Composer will automatically create a new project based on Roadiz and download every dependencies.

Composer script will copy a default configuration file and your entry-points in web/ folder automatically and a sample Vagrantfile in your project root.

Update Roadiz and your own theme assets

composer update -o --no-dev

# Re-install your theme in public folder using relative symlinks (MacOS + Unix)
# remove --relative flag on Windows to generate absolute symlinks
bin/roadiz themes:assets:install --symlink --relative FooBar;

Develop with PHP internal server

  • Copy .env.dist file to .env
# Edit your Makefile "DEV_DOMAIN" variable to use a dedicated port
# to your project and your theme name.
nano Makefile;

# Launch PHP server
make dev-server;

Develop with Vagrant

For development, here are some useful commands:

# Edit your Vagrantfile and use a dedicated IP
# add this IP to your /etc/hosts
nano Vagrantfile;

# Adapt Makefile with your theme name and NPM/Yarn
# This will be useful to generate assets and clear cache
# in one command
nano Makefile; 
cd themes/FooBarTheme;
# Install NPM dependencies for your front-end dev environment.
# Use YARN
yarn;
# OR use vanilla NPM
npm install;

# Init Vagrant dev VM
# This may take several minute if your 
# launching Vagrant up for the first time
# as it has to download Roadiz box which is ~ 1,2GB
cd ../../;
vagrant up;

If you have a full PHP-MySQL server running directly on your development machine you can
ignore Vagrant and use it. Make sure that your virtual host is configured to use web/
folder as server root.

Develop with Docker

Docker on Linux will provide awesome performances and a production-like environment
without bloating your development machine:

  • Copy .env.dist file to .env
# Copy sample environment variables
# and adjust them against your needs.
cp .env.dist .env;
# Build PHP image
docker-compose build;
# Create and start containers
docker-compose up -d;

# Adapt Makefile with your theme name and NPM/Yarn
# This will be useful to generate assets and clear cache
# in one command
nano Makefile; 
cd themes/FooBarTheme;
# Install NPM dependencies for your front-end dev environment.
# Use YARN
yarn;
# OR use vanilla NPM
npm install;

Install your theme assets and execute Roadiz commands

You can directly use bin/roadiz command through docker-compose exec:

# Install Rozier back-office assets
docker-compose exec -u www-data app bin/roadiz themes:assets:install Rozier

# Install your theme assets as relative symlinks
docker-compose exec -u www-data app bin/roadiz themes:assets:install --symlink --relative FooBar

On Linux

Pay attention that PHP is running with www-data user. You must update your .env file to
reflect your local user UID during image build.

# Type id command in your favorite terminal app
id
# It should output something like
# uid=1000(toto)

So use the same uid in your .env file before starting and building your docker image.

USER_UID=1000

On Mac or Windows

Unfortunately, on macOS and Windows performances will be worse than Vagrant due to
the volumes sharing system. You can use docker-sync to improve IO performances
with your shared volumes.
Use following command instead of docker-compose up -d:

# Make sure you setup docker-sync on your computer before.
# gem install docker-sync
docker-sync-stack start

Update Roadiz sources

Simply call composer update to upgrade Roadiz.
You’ll need to execute regular operations if you need to migrate your database.

Maximize performances for production

You can follow the already well-documented article on Performance tuning for Symfony apps.

Optimize class autoloader

composer dump-autoload --optimize --no-dev --classmap-authoritative

Increase PHP cache sizes

; php.ini
opcache.max_accelerated_files = 20000
realpath_cache_size=4096K
realpath_cache_ttl=600

Build a docker image with Gitlab Registry

You can create a standalone Docker image with your Roadiz project thanks to our roadiz/php74-nginx-alpine base
image, a continuous integration tool such as Gitlab CI and a private Docker registry.
All your theme assets will be compiled in a controlled environment and your production website
will have a minimal downtime at each update.

Make sure you don’t ignore package.lock or yarn.lock in your themes not to get dependency errors when your
CI system will compile your theme assets. You may do the same for your project composer.lock to make sure
that you’ll use the same dependencies version in dev as well as in your CI jobs.

Standard Edition provides a basic configuration set with a Dockerfile:

  1. Customize .gitlab-ci.yml file to reflect your Gitlab instance configuration and your theme path and your project name.
  2. Add your theme in Composer pre-docker scripts to be able to install your theme assets into web/ during Docker build:
php bin/roadiz themes:assets:install MyTheme
  1. Add your theme in .dockerignore file to include your assets during build, update the following lines to force ignored files into your Docker image:
!themes/BaseTheme/static
!themes/BaseTheme/Resources/views/partials/*
  1. Enable Registry and Continuous integration on your repository settings.
  2. Push your code on your Gitlab instance. An image build should be triggered after a new tag has been pushed and your test and build jobs succeeded.
To the top