xentriq/xentriq.project

This project package provides an easy way to start with Xentriq.


Keywords
templating, project, xentriq
License
MIT

Documentation

Xentriq Composer Project

This project should make it easy to get started with Xentriq.

If you would like to know more about Xentriq or if you want to know how to build on this basic project see the Xentriq documentation.

Generating a new project

You can use the following command to create a basic Xentriq project setup:

composer create-project nentix/xentriq.project

For more information about Xentriq and how to build upon this basic set-up see the Xentriq documentation.

Run with Docker

The following example commands show a very basic way of running the newly created project with Docker.

Prerequisites

  • Docker
  • (Optional) docker-compose

Steps

1. Build

To build the container with the current contents of the directory:

docker build -t xentriq-project ./

2. Run

To run the container use the following command:

docker run -p8080:80 xentriq-project

Alternatively a docker-compose file is provided as part of this repository as well. To build and run simply use the following command:

docker-compose up

3. Browse

You can now open your browser and navigate to http://localhost:8080 to view the running Xentriq project.

Developing with Docker

It is of course convenient to not have to rebuild the container everytime you change your templates, CSS or Javascript. The following steps should help you set up a docker container that mounts the local directory so that changes are immediately visible and rebuilds are not needed during development.

Prerequisites

  • Docker
  • Docker Compose
  • Composer

Steps

You can use the provided convenience script that should set everything up for you with the following command:

./run.sh

If you cannot use this script follow the following steps:

1. Preparation

To set-up the development directory so that the docker container will be able to compile your templates and has all the necessary dependencies run the following:

mkdir data && sudo chown www-data:www-data ./data
composer install --ignore-platform-reqs

The first command creates the Xentriq data-directory and gives full permissions to the www-data user and group used by Apache inside the container so that Xentriq can edit the folder and its contents. The second command installs the composer packages into your local directory so that all Xentriq packages are ready to be used by the container.

2. Build and run

To build the container with the current contents of the directory:

docker-compose -f docker-compose.yml -f docker-compose.dev.yml up

4. Browse

You can now open your browser and navigate to http://localhost:8080 to view the running Xentriq project.