Development Release 0.9.5
Get the source code
The latest version of the code can be downloaded from GitHub.
Required configuration
To test the website on a local terminal, you need:
a MacOS X or Linux system to run the test scripting shell
the MySQL server 5.7
Installation
Start the configuration script:
$ ./configure.sh -c -m
Submodule path '.travis/TravisCI-OSX-PHP': checked out 'c7500f7004b5161edda8b452a5e5b18a6abd536a'
Submodule path 'app/Plugin/Markdown': checked out 'f15c7f3479577808b751d0fe39c216d7e3ec0f58'
Submodule path 'app/webroot/php_cms': checked out 'b4b2ea007173eaffcd238aaa2da44e3a6ed8121a'
Composer [OK]
Composer version 1.7.3 2018-11-01 10:05:06
//// FAQ:
1. When SHA1 signature could not be verified: broken signature appears on terminal :
The composer binary wasn't downloaded on this machine or it must be updated :
Please copy and run :
rm bin/composer.phar && ./Scripts/composer.sh
Loading composer repositories with package information
Updating dependencies (including require-dev)
The MySQL database
If everything went well, the database is correctly configured. In case of failure, check your mysql server installation (database 'phpcms' created, privileges and access rights 'test' ) from the local program mysql, basically:
$ mysql GRANT ALL ON phpcms. * to 'test' @ 'localhost' identified by 'mypassword';
You can start the migration (update ) with super-user privileges:
$ ./migrate_database.sh -u -y
Use the local server
Start the local test server provided by CakePHP
, then launch an internet browser on the page localhost: 8080:
$ ./start-script.sh -p=<sql-root-password>
First test
The home page should be displayed otherwise an error will appear and you should check the administrator part.
Administrator login
If the captcha does not appear, choose "Disconnect" from the left menu. Find the part "Administration" with the menu on the left.
Post a message or a news
Try to post a first article, for example the greeting for future visitors to the website.
📋 Tip:
Set the published date to some later day in order to keep it as a draft. The post is hidden until that date.
Formatting the text
In principle the support of tags Markdown is enabled for the entire website.
📋 Tip:
Testing the configuration
Go to /test.php, you may have to install PHPUnit with Composer, follow the instructions.
Go to the homepage
Your website is ready for the first visit! /index Once the tests have successfully finished you can deploy from this source code to a remote http server (Openshift).
Openshift deployment
- Create a new project using the docker image openshift/cakephp-mysql-persistent.json
Deployment configuration
- Define Environment variable to enable the CakePhp Debugger :
CAKEPHP_DEBUG_LEVEL:1
- Add Secrets to Resources map. Name it myphpcms-tokens and set the variable with the password from local configuration Terminal (e.g. OSX):
$ ./configure.sh -h
Provided local/test bootargs...
DB : Mysql
Run Step 2. Get a hashed password with encryption, PHP encrypts.
?...
Yes.
Please enter a password :
Please re-enter the password :
Please enter the salt word :new
Password was encrypted with new : <crypted-password>
You can use it as GET_HASH_PASSWORD. Goodbye !
Saved in export_hash_password.sh .
In Opensfhit Web Console set a new secret:
GET_HASH_PASSWORD:<crypted-password>
- Add to the Config Maps the following dataset, saved as "deployment" ConfigMap:
apiVersion: v1
data:
DATABASE_ENGINE: MysqlCms
DATABASE_NAME: default
DATABASE_SERVICE_NAME: MYSQL
MYSQL_SERVICE_HOST: mysql
MYSQL_SERVICE_PORT: '3306'
kind: ConfigMap
- Add the Environment variables from cakephp-mysql-persistent secrets
TEST_DATABASE_USER:<database-user>
TEST_DATABASE_PASSWORD:<database-password>
-
In Applications Deployment, tap on the Environment tab. You need to define more variables to make POHSE CMS work with CakePhp. Just click Add ALL Values from Config Map or Secret from deployment ConfigMap without and with TEST_ prefix and myphpcms-tokens secret.
-
In advanced options, add a new Post Commit Hook:
./configure.sh -c -m --openshift --mig-database -v
# disabled build wouldn't connect to test databases
#./test-cake.sh "--verbose" "--openshift" | grep Test
1st build and deployment
Your project is ready to checkout your first build. Simply reach out the Overview of your Applications tab.
📋 Tip:
To save CPU node usage, and time, set Maximum Number of Unavailable Pods to 100% and Maximum Number of Surge Pods to 0%.
You can start a build action now and a new deployment will roll out in a couple of seconds.