Releases: b23prodtm/acake2php
Deployment Release Candidate
Most of the development made on self made image-stack. It was deployed at home on a Raspberry Pi 3 from a 2x2-cluster (More about acake2php and db services comes next)
It's able to deploy itself on Balena Cloud fleet services.
Release Candidate
Follow #57
Most of the development made on self made image-stack. It was deployed at home on a Raspberry Pi 3 from a 2x2-cluster (More about acake2php and db services comes next)
Deployment log output
Supervisor starting
<acake2php>
<acake2php> [./migrate-database.sh] BASH /usr/local/bin/init_functions
<acake2php>
<acake2php>
<acake2php> [./migrate-database.sh] BASH /var/www/localhost/htdocs/Scripts/lib/parsing.sh
<acake2php>
<acake2php>
<acake2php> [./migrate-database.sh] BASH /usr/local/bin/init_functions
<acake2php>
<acake2php> * ./migrate-database.sh
<acake2php> * Bootargs...: -u -i -v
<acake2php> * ./migrate-database.sh
<acake2php> * acake2php.log
<acake2php>
<acake2php> Passed params : ./migrate-database.sh -o -u -i -v
<acake2php> and environment VARIABLES:
<acake2php> declare -x DATABASE_USER="root"
<acake2php> declare -x MYSQL_DATABASE="aria_db"
<acake2php> declare -x MYSQL_HOST="db"
<acake2php> declare -x MYSQL_PASSWORD="maria-abc"
<acake2php> declare -x MYSQL_ROOT_PASSWORD="mariadb"
<acake2php> declare -x MYSQL_TCP_PORT="3306"
<acake2php> declare -x MYSQL_USER="maria"
<acake2php> declare -x TEST_DATABASE_NAME="test"
<acake2php>
<acake2php> * Run \033[0;36mSetup database.cms.php connection and socket\n\033[0m ?...
<acake2php> Yes.
<acake2php>
<acake2php> [/var/www/localhost/htdocs/Scripts/config_app_database.sh] BASH /usr/local/bin/init_functions
<acake2php>
<acake2php>
<acake2php> [/var/www/localhost/htdocs/Scripts/config_app_database.sh] BASH /var/www/localhost/htdocs/Scripts/lib/parsing.sh
<acake2php>
<acake2php> Missing homebrew... aborted mysql check.
<acake2php>
<acake2php> [/var/www/localhost/htdocs/Scripts/config_app_database.sh] BASH /usr/local/bin/init_functions
<acake2php>
<acake2php> 'database.cms.php' -> 'database.php'
<acake2php> * /var/www/localhost/htdocs/Scripts/config_app_database.sh
<acake2php> * database.cms.php copied. Please, review the files.\n
<acake2php>
<acake2php> [/var/www/localhost/htdocs/Scripts/config_app_database.sh] BASH /usr/local/bin/init_functions
<acake2php>
<acake2php> 'Schema/schema.cms.php' -> 'Schema/schema.php'
<acake2php> * /var/www/localhost/htdocs/Scripts/config_app_database.sh
<acake2php> * Schema/schema.cms.php copied. Please, review the files.\n
<acake2php> mysql Ver 15.1 Distrib 10.5.8-MariaDB, for Linux (armv8l) using readline 5.1
<acake2php> * /var/www/localhost/htdocs/Scripts/config_app_database.sh
<acake2php> * \033[0;33mPlease allow the super-user to link mysql socket to /tmp/mysqld.sock ...\033[0m
<acake2php> srwxrwxrwx 1 root root 0 Jul 2 11:14 /var/run/mysqld/mysqld.sock
<acake2php> * /var/www/localhost/htdocs/Scripts/config_app_database.sh
<acake2php> * \033[0;32mNotice: mysqld.sock was found.\033[0m
<acake2php> ! \033[0;31mWARNING: You will modify SQL root password !\033[0m
<acake2php> * ./migrate-database.sh
<acake2php> * Forked script to keep hidden table user secrets...
<acake2php> * Run Import default identities ?...
<acake2php> Yes.
<acake2php> bash: line 1: log_failure_msg: command not found
<acake2php> * ./migrate-database.sh
<acake2php> * \r\033[0;31mWARNING: You will modify SQL maria password !\033[0m
<acake2php> * Run Import test identities ?...
<acake2php> Yes.
<acake2php> bash: line 1: log_failure_msg: command not found
<acake2php>
<acake2php> [./Scripts/start_daemon.sh] BASH /usr/local/bin/init_functions
<acake2php>
<acake2php>
<acake2php> [./Scripts/start_daemon.sh] BASH /usr/local/bin/init_functions
<acake2php>
<acake2php>
<acake2php> [./Scripts/start_daemon.sh] BASH /var/www/localhost/htdocs/Scripts/lib/parsing.sh
<acake2php>
<acake2php> * ./Scripts/start_daemon.sh
<acake2php> * acake2php.log
<acake2php> * ./Scripts/start_daemon.sh
<acake2php> * Migrating database 'cake schema update' ...
<acake2php> * ./Scripts/start_daemon.sh
<acake2php> * Passed Cake Args:(update --connection=default -v ) -> --connection=default -v
<acake2php> [!] FAILED
<acake2php> * ./Scripts/start_daemon.sh
<acake2php> * Generating default Sessions table
<acake2php> [!] FAILED
<acake2php> * ./Scripts/start_daemon.sh
<acake2php> * Generating database schema 'cake schema generate'
<acake2php> [!] FAILED
<acake2php>
<acake2php> [./migrate-database.sh] BASH /usr/local/bin/init_functions
<acake2php>
<acake2php>
<acake2php> [./migrate-database.sh] BASH /var/www/localhost/htdocs/Scripts/lib/parsing.sh
<acake2php>
<acake2php>
<acake2php> [./migrate-database.sh] BASH /usr/local/bin/init_functions
<acake2php>
<acake2php> * ./migrate-database.sh
<acake2php> * Bootargs...: -u -v --connection=test
<acake2php> * ./migrate-database.sh
<acake2php> * acake2php.log
<acake2php>
<acake2php> Passed params : ./migrate-database.sh -o -u -v --connection=test
<acake2php> and environment VARIABLES:
<acake2php> declare -x DATABASE_USER="root"
<acake2php> declare -x MYSQL_DATABASE="aria_db"
<acake2php> declare -x MYSQL_HOST="db"
<acake2php> declare -x MYSQL_PASSWORD="maria-abc"
<acake2php> declare -x MYSQL_ROOT_PASSWORD="mariadb"
<acake2php> declare -x MYSQL_TCP_PORT="3306"
<acake2php> declare -x MYSQL_USER="maria"
<acake2php> declare -x TEST_DATABASE_NAME="test"
<acake2php>
<acake2php> * Run \033[0;36mSetup database.cms.php connection and socket\n\033[0m ?...
<acake2php> Yes.
<acake2php>
<acake2php> [/var/www/localhost/htdocs/Scripts/config_app_database.sh] BASH /usr/local/bin/init_functions
<acake2php>
<acake2php>
<acake2php> [/var/www/localhost/htdocs/Scripts/config_app_database.sh] BASH /var/www/localhost/htdocs/Scripts/lib/parsing.sh
<acake2php>
<acake2php> Missing homebrew... aborted mysql check.
<acake2php>
<acake2php> [/var/www/localhost/htdocs/Scripts/config_app_database.sh] BASH /usr/local/bin/init_functions
<acake2php>
<acake2php> 'database.cms.php' -> 'database.php'
<acake2php> * /var/www/localhost/htdocs/Scripts/config_app_database.sh
<acake2php> * database.cms.php copied. Please, review the files.\n
<acake2php>
<acake2php> [/var/www/localhost/htdocs/Scripts/config_app_database.sh] BASH /usr/local/bin/init_functions
<acake2php>
<acake2php> 'Schema/schema.cms.php' -> 'Schema/schema.php'
<acake2php> * /var/www/localhost/htdocs/Scripts/config_app_database.sh
<acake2php> * Schema/schema.cms.php copied. Please, review the files.\n
<acake2php> mysql Ver 15.1 Distrib 10.5.8-MariaDB, for Linux (armv8l) using readline 5.1
<acake2php> * /var/www/localhost/htdocs/Scripts/config_app_database.sh
<acake2php> * \033[0;33mPlease allow the super-user to link mysql socket to /tmp/mysqld.sock ...\033[0m
<acake2php> srwxrwxrwx 1 root root 0 Jul 2 11:14 /var/run/mysqld/mysqld.sock
<acake2php> * /var/www/localhost/htdocs/Scripts/config_app_database.sh
<acake2php> * \033[0;32mNotice: mysqld.sock was found.\033[0m
<acake2php>
<acake2php> [./Scripts/start_daemon.sh] BASH /usr/local/bin/init_functions
<acake2php>
<acake2php>
<acake2php> [./Scripts/start_daemon.sh] BASH /usr/local/bin/init_functions
<acake2php>
<acake2php>
<acake2php> [./Scripts/start_daemon.sh] BASH /var/www/localhost/htdocs/Scripts/lib/parsing.sh
<acake2php>
<acake2php> * ./Scripts/start_daemon.sh
<acake2php> * acake2php.log
<acake2php> * ./Scripts/start_daemon.sh
<acake2php> * Migrating database 'cake schema update' ...
<acake2php> * ./Scripts/start_daemon.sh
<acake2php> * Passed Cake Args:(update --connection=test ) -> --connection=test
<acake2php> [!] FAILED
<acake2php> * ./Scripts/start_daemon.sh
<acake2php> * Generating default Sessions table
<acake2php> [!] FAILED
<acake2php> * ./Scripts/start_daemon.sh
<acake2php> * Generating database schema 'cake schema generate'
<acake2php> [!] FAILED
<acake2php> GOAL app Controller/PagesController --stderr >> acake2php.log -v
<acake2php> [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
<acake2php> [s6-init] ensuring user provided files have correct perms...exited 0.
<acake2php> [fix-attrs.d] applying ownership & permissions fixes...
<acake2php> [fix-attrs.d] done.
<acake2php> [cont-init.d] executing container initialization scripts...
<acake2php> [cont-init.d] done.
<acake2php> [services.d] starting services
<acake2php> www-data:x:82:apache,www-data
<acake2php> uid=103(www-data) gid=82(www-data) groups=82(www-data),82(www-data)
<acake2php> [services.d] done.
<acake2php> www-data:x:103:82:Linux User,,,:/home/www-data:/sbin/nologin
<acake2php> uid=103(www-data) gid=82(www-data) groups=82(www-data),82(www-data)
<db> [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
<db> [s6-init] ensuring user provided files have correct perms...exited 0.
<db> [fix-attrs.d] applying ownership & permissions fixes...
<db> [fix-attrs.d] done.
<db> [cont-init.d] executing container initialization scripts...
<db> [cont-init.d] 10-adduser: executing...
<db> usermod: no changes
<db>
<db> -------------------------------------
<db> _ ()
<db> | | ___ _ __
<db> | | / __| | | / \
<db> | | \__ \ | | | () |
<db> |_| |___/ |_| \__/
<db>
<db>
<db> Brought to you by linuxserver.io
<db> We gratefully accept donations at:
<db> https://www.linuxserver.io/donate/
<db> -------------------------------------
<db> GID/UID
<...
v0.9.5.725: Automatic build handle (pre-Docker image) (#45)
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.
v0.9.5.555
v0.9.5.549
untagged-e19adca16e3974557b45: automated release
Responsive Layout
- Media queries for handlhelds up to ~10 inches
- Lansdcape / portrait queries
- More templates (library, admin post)
- Added basic PHPunit test cases
Added google headers (author public-id)
0.9.2-ggl_headers google headers
Template and HTML content supported.
0.9-rc1 database schema