Crafter CMS is an open source content management system for Web sites, mobile apps, VR and more. You can learn more about Crafter here: http://docs.craftercms.org/en/latest/index.html
This repository is the parent project that builds everything and helps you build one of two things:
-
Deployable Crafter CMS bundle
-
Developer's environment so you can compile and contribute to Crafter CMS
You must have these prerequisites on your system before you begin:
- Java 8
- Git 2.x+
- Maven 3.3.x+
OS X extra prerequisite
- If you're on OS X, then using
brew
install the latestopenssl
formula, like this:brew install openssl
Let's begin :)
git clone https://github.com/craftercms/craftercms.git
To build a deployable and distributable bundle of Crafter CMS, use the Gradle task bundle
. This task will generate .zip
and .tar.gz
files ready to be deployed to any system.
Archives will be named crafter-cms.tar.gz
and crafter-cms.zip
and can be found in the bundles
folder.
./gradlew init build deploy bundle
To run Crafter CMS from the bundle, unzip and follow the instructions in the bundle's README.txt
.
Crafter CMS is a decoupled CMS, and that means you have an authoring
environment that caters to content creators, and a different environment, delivery
, that handles the end-users that use the experience created by the former.
To build a bundle for a specific environment:
./gradlew bundle -Penv=authoring
Archives will be named crafter-cms-authoring.tar.gz
and crafter-cms-authoring.zip
and can be found in the bundles
folder.
For the delivery
environment, simply substitute the env=authoring
with env=delivery
.
To download,build and generate Bundle from given Tag or Branch of the source code
./gradlew init build deploy bundle -Pcrafter.git.branch={BRANCH}/{TAG NAME}
Replace {BRANCH} or {TAG NAME} with the branch and tag you'd like to build.
Note: When using a tag-based build, you're essentially cloning a point in time to build that specific version of Crafter CMS. That implies that you won't be able to update/nor push changes back.
Crafter CMS is built along a microservices architecture, and as such, comprises a number of head-less, RESTful, modules that work together to provide the final solution. In this section, we'll start with the simple case of build everything/run everything, and then move on to building/hacking individual modules.
Build all Crafter CMS modules
./gradlew init build deploy
Start Crafter CMS,
./gradlew start
You can now point your browser to http://localhost:8080/studio and start using Crafter CMS. To get started with your first Crafter CMS experience, you can follow this guide: http://docs.craftercms.org/en/latest/content-authors/index.html.
- The authoring environment runs on port
8080
, a great place to start, while the delivery environment runs on port9080
.
Stop Crafter CMS,
./gradlew stop
You might have noticed that you essentially have two environments built and running: authoring
and delivery
. Crafter CMS is a decoupled CMS, and that means you have an authoring
environment that caters to content creators, and a different environment, delivery
, that handles the end-users that use the experience created by the former.
As a developer, you can use an authoring
environment for most tasks without the need to run a delivery
environment. It's important to note that delivery
essentially runs the same software that's in authoring
except Crafter Studio (the authoring tools).
By default, this project will build both environments unless instructed otherwise. The authoring
environment runs at http://localhost:8080/studio, whereas the delivery
environment runs at http://localhost:9080/studio.
To build, start and stop one of the two environments is similar to building/starting/stopping All.
./gradlew build deploy -Penv=authoring
./gradlew start -Penv=authoring
./gradlew stop -Penv=authoring
./gradlew build deploy -Penv=delivery
./gradlew start -Penv=delivery
./gradlew stop -Penv=delivery
The mechanics for working with a single module are similar to working with all, with one exception: You can deploy a module to one or both environments (authoring
/delivery
).
Crafter CMS comprises the modules:
You'll find these projects checked out and ready for you to contribute to in the folder src/{moduleName}
.
Start by forking the module you want to work on. You can follow the GitHub instructions.
The next step is to switch the origin url location to be the one just forked, to do so you can use these GitHub instructions.
The last step will be to add an upstream repository from the main craftercms
repo to your own. Follow these steps
to make it happen.
You can now work in your local system, and build/deploy and ultimately push to your fork. We welcome code contributions, so please do send us pull-requests.
To update your project with the latest from your repo:
./gradlew update
To get the latest code from craftercms
, in order to have the latest updates from the community:
./gradlew update -Pcrafter.git.remote=upstream
You can update, build, deploy, start or stop a module by:
./gradlew update -PmoduleName=studio
./gradlew build -PmoduleName=studio
./gradlew deploy -PmoduleName=studio -Penv=authoring
./gradlew start -PmoduleName=studio -Penv=authoring
./gradlew stop -PmoduleName=studio -Penv=authoring
- If you don't specify the
env
parameter, it means all environments (where applicable). - In the current version of Crafter CMS, some services run in the same Web container, and that implies the stopping/starting of one of these services will cause other services to stop/start as well.
For more detailed information and advanced topic, please visit the detailed documentation.