📜 ⬆️ ⬇️

Cakephp and code google hosting projects

The following describes the organization of the project for the development of several programmers,
c using Subversion version control (svn).
The example uses a service from Google hosting projects ,
PHP framework CakePHP and * nix similar OS.

And so what do we need.
- Configured apache under cakephp and installed svn
- Created project on code.google.com/hosting

In the root directory of the new project / var / www / myproject perform the following:

1. copy .htaccess, for apache / mod_rewrite
if you are using another web server, you can skip this step.
svn export svn.cakephp.org/repo/trunk/cake/1.2.xx/.htaccess

')
2. copy the core of the key (nightly build)
svn checkout svn.cakephp.org/repo/trunk/cake/1.2.xx/cake cake


3. copy the svn repository from code google / hosting to the app directory
you can peep in tab [Source] project
svn checkout https: // {project name} .googlecode.com / svn / trunk / app --username {login}

enter the password

4. copy files for the app
svn export --force svn.cakephp.org/repo/trunk/cake/1.2.xx/app app


5. then simply configure app / config / core.php
in particular, we change salt, cache type, etc.
access app / tmp
chmod -R 777 app / tmp


6. add files to the repository, execute in the app directory:
svn add *

I do not advise you to add to the repository app / config / database.php, because the server will be different.

7. send files to the hosting project (commit):
svn commit


8. add code friends to the project as members or owners,
From this point on, it can be said that development begins.
To copy the project, they will need to perform 1-3 points.

On the hosting of the site itself, you will need to perform points 1-2, 3m I advise you to merge the repository as readonly.
Create an app / config / database.php with the necessary settings and access the app / tmp.

As for the database, it is better to use an external database "looking" to the Internet,
with the installed web interface. So it will be more convenient to synchronize tables.

Advantages of this scheme
+ fresh build cakephp
+ A convenient update on the server and locale, in the cake and app directory, all lig, you need to perform
svn update

+ actually, control of versions of the project and convenient multiuser development
+ there is always backup;)

Minuses
- possible inheritance of "holes" from new versions of cakephp
- if you see more, tell me, add.

Some more tips:
- do not add cache files from tmp to the repository
- for multi-user development, update the local version more often
svn update

- if there is a conflict in the file at commit,
it can be solved with the svn command of the resolved
edit the file to the desired form and execute
svn resolved / path / to / file

Source: https://habr.com/ru/post/54821/


All Articles