This repository contains both, an example docker compose stack for creating a new project with Gentics Portal | php, Gentics Mesh and Gentics CMS and an easy to start demo application showing the most important features of Gentics Portal | php
| Branch | Description | Documentation |
|---|---|---|
| newproject | For creating a fresh new project with Gentics Portal php | Link |
| demo | Demo reference application | Link |
Important: When using Windows, you must configure your GIT client to not convert line endings to windows line endings BEFORE cloning this GIT repository.
git config --global core.autocrlf input
Read the section "Installing the requirements" for more specific details on how to install and configure the required tools. If you encounter any errors, you maybe find a solution on this page here.
Contact Gentics if you haven't received your credentials for repo.apa-it.at yet.
Open the composer file auth.json. You can also edit %USERPROFILE%AppDataRoamingComposerauth.json or ~/.composer/auth.json instead.
composer config --global --auth --editorMake sure your auth.json contains the following configuration:
{
"http-basic": {
"repo.apa-it.at": {
"username": "MYUSERNAME",
"password": "MYPASSWORD"
}
}
}
Replace MYUSERNAME and MYPASSWORD. Use the API key as password, which can be generated/retrieved in the Artifactory profile page.
Log in into the docker registry and use the same credentials like above:
docker login repo.apa-it.at
See: https://github.com/gentics/portal-php-reference/blob/demo/README.demo.md
This explains how to setup a basic Laravel project with the portal-php package.
composer create-project gentics/portal-php-laravel-project portal --repository-url "https://repo.apa-it.at/api/composer/php"This adds the repository "gentics" to your projects composer.json, pulls the dependencies and copies some default files from the portal-php package.
POST requests from the CMS to the CmsController do not work by default because the stock Laravel .htaccess redirects all requests that have a trailing slash in order to remove it. However due do the RFC standard which disallows POST redirects without user interaction, this means that the POST data is lost.
We can fix this easily, in portal/public/.htaccess find this line (line 12):
# Redirect Trailing Slashes If Not A Folder...Add this after:
RewriteCond %{REQUEST_METHOD} =GETCopy the file docker-compose.override.yml.example to docker-compose.override.yml
You can configure passwords, ports, environment variables and other settings in docker-compose.override.yml
The license key for the cms has to be changed.
docker-compose.override.yml.example to docker-compose.override.ymlYou can configure passwords, ports, environment variables and other settings in docker-compose.override.yml
The license key for the cms has to be changed.
portal/.env.example to portal/.envThis file contains the environment settings for the Laravel framework.
Run:
docker-compose up -ddocker-compose psdocker-compose logs -f name. e.g.: docker-compose logs -f portalSet AUTOGENERATE_MESH_API_KEY environment variable to false for the portal.
http://localhost:8080 - If asked for authentication, register a new account (Keycloak)
http://localhost:8081 - Use admin admin as login
http://localhost:8082 - Use node node as login
Install the GIT client from https://git-scm.com/downloads
Make sure to enable "Checkout as-is, commit Unix-style" when the installer asks you.
Install the package "git" with the packet manager.
Minimum Hardware Requirements:
Check if PHP 8.1.7 or higher is already installed by running php -version
If your operating system has a packet manager with PHP 8.1.7 or higher, install the package, otherwise download PHP from https://windows.php.net/download#php-8.1 (PHP 8.1 "VS16 x64 Non Thread Safe" for Windows).
If you do any changes do the Dockerfile or files in portal-files, you have to run
docker-compose build