cakephp version 3 file structure for multiple apps - cakephp-3.0

I am a relatively new user of Cakephp and have been using Version 2 for just a few months.
I am having trouble finding info on folder structure for multiple apps with Cakephp 3. My current structure:
app_myapp1 (app files)
app_myapp2 (app files)
cake_core (core files)
public_html
-> myapp1 (webroot files)
-> myapp2 (webroot files)
How do I set up the version 3 folders in order to have multiple apps with the same core files?

Looks like your method is no longer supported
CakePHP should be installed with Composer Since CakePHP can no longer
easily be installed via PEAR, or in a shared directory, those options
are no longer supported. Instead you should use Composer to install
CakePHP into your application.
http://book.cakephp.org/3.0/en/appendices/3-0-migration-guide.html

Related

Creating application with OpenShift 3

I'm using the new open shift 3 and I'm trying to create a new app with 3 different sources
the centos/php-56-centos7 - base image
A public github repo - external framework source code
my local project files - 3rd party source code
The project "depends" on the 1st two sources being compiled and then and my local project files( 3rd item) needs to "merge/ integrated" with the compiled result contents already instantiated by the 1st 2.
What's the best approach to deal with this development approach?
I managed to get as far as creating a build for the first two sources via
oc new-build centos/php-56-centos7~https://github.com/invoiceninja/invoiceninja.git --dry-run -e DOCUMENTROOT=/public --name=invoiceninja-wipay
creating/ deploying on this build alone creates a successful deployment. I'm just not sure now how to "integrate" the 3rd source( local project assets/ files) into the build without replacing the contents already there

How to backup PhpStorm project Context?

I like so much the Context feature of PhpStorm, localized in Tools > Tasks & Contexts > Save Context or Load Context
When I have a new computer, I can import all PhpStorm settings, but how to can I backup Context to my other computer?
Such data is stored in separate .zip files on per project basis (tasks and contexts separately -- 2 files per project).
On Windows 7 for PhpStorm v10 they will be located in C:\Users\USERNAME\.WebIde100\config\tasks folder.
For another OS/IDE version please check this document.

Multiple alias in one account

I never used fortrabbit before and i have a question about it.
I know i can create apps and define the document root, but lets imagine the following:
I want to go with Yii2 Framework (Advanced template)
Advanced template have "two apps" in it (2 folders) the backend and the frontend.
On a real server we have to create two alias, eg:
admin.myapp.com -> root/backend/www
www.myapp.com -> root/frontend/www
Is possible to configure the fortrabbit to work with it within the same application and share the same resources (MySQL, cache, etc)?
your setup is possible at fortrabbit.
Just put both folders in your git repo and push to forrabbit. After that you can route the subdomains (www., admin.) to the subfolders (frontend/www, backend/www).
If your project requires a composer install during the deploy process it will not work our of the box, since we check only for the composer.json/lock in the root of your project.
However you can define your custom post-deploy scripts. In these script you could call a composer install in the subfolders.
Cheers
Oliver (fortrabbit staff)

Openshift: where to put resource files that I want outside of the deployment folder

I'm starting a new web app with Openshift (jboss, mysql). It's the first time I use openshift and after reading through some doc and experimenting a bit with it, I'm having one question regarding best practices for the architecture of my app.
There will be some files generated by- or uploaded to the application (resources). I'd like those files to be outside the deployment folder so they are not erased/overwritten when the app deploys again. I have browsed through the directories and I was wondering:
is it ok to use the /var/lib/openshift/[openshift-id]/app-root/data folder for these files?
Yes, you should use your ~/app-root/data folder for any files that you want to not be erased when you do a git push, there is also an environment variable that you can use that points to that folder called OPENSHIFT_DATA_DIR. Please note that if you are using a scaled application, that folder is not shared among your gears.

Silverstripe - adding a blog?

Need some help adding a blog for this client in Silver stripe CMS.
The client is http://arborwinsys.co.uk/
and the SilverStripe version is - 2.3.7
Would it work installing this module?
https://github.com/silverstripe/silverstripe-blog
The git master branch that you are looking at contains changes for SilverStripe 3. To make the blog work with your SilveStripe version you'll have to go back to the blog module 0.4 or 0.3 by switching the branches.
Steps to adding the blog module to silverstripe 2.3
Download the .zip from https://github.com/silverstripe/silverstripe-blog/tree/0.3
(later versions of the module require later versions of silverstripe)
Extract the contents of the .zip file (it may be within one directory in the .zip file) to a new folder called "blog" in your silverstripe install (it should be at the root level - that is, it should be in the same folder as your "mysite", "cms" and "sapphire" folders
Run a /dev/build on your silverstripe install
Run a ?flush=all on your silverstripe site
if you have any issues:
Ensure you downloaded the correct file (later versions of the module will not work unless you update your silverstripe install)
ensure that you have extracted the files correctly:
e.g. if your website is www,mysite,com and you can access your admin from www,mysite,com/admin - you should have your files in www,mysite,com/blog
ensure you have done a rebuild on your site
try doing a flush
if all else fails, post the error you're receiving back on here.
Good luck!