2017 © Pedro Peláez
 

project git-web-client

Web Git client using full stack Symfony2 with SSH/SFTP support

image

sshversioncontrol/git-web-client

Web Git client using full stack Symfony2 with SSH/SFTP support

  • Thursday, September 28, 2017
  • by SSHVersionControl
  • Repository
  • 2 Watchers
  • 12 Stars
  • 409 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 3 Open issues
  • 6 Versions
  • 11 % Grown

The README.md

[ABANDONED] GIT Web Interface Client Build Status Coverage Status Latest Version Total Downloads GitHub license Scrutinizer Code Quality

Welcome to the GIT Web Interface Version Control Client. This systems allows you to commit,search history, branch, push, pull, and many other action on git repositories, locate locally and on remote servers with SFTP/SSH access. This system has been build using full stack Symfony2 framework. It comes with an inbuilt issue tracker, to help organise your bugs, but also integrates with Github or Gitlabs, issue tracker for better remote support., (*1)

Note:

This application is still very much in alpha state, so expect some issues. If you get any issue try viewing the application using /app_dev.php/* which uses the Symfony 2 debugging tool which should help in figuring out the problem., (*2)

1) Requirements

  • php > 5.6 (mcrypt)
  • mysql or mariadb
  • webserver ( apache, nginx, php server)
  • Git install on command line for server/computer with repository

2) Installing the Web GIT Version Control System

When it comes to installing, you have the following options., (*3)

If you don't have Composer yet, download it following the instructions on http://getcomposer.org/ or just run the following command:, (*4)

    $ curl -s http://getcomposer.org/installer | php

Create a new folder somewhere under your web server root directory ( eg /var/www/version-control/) and run the following command:, (*5)

    $ php -d memory_limit=-1 composer.phar create-project -s dev sshversioncontrol/git-web-client 

If composer is install globally then just run the command:, (*6)

    $ composer create-project -s dev sshversioncontrol/git-web-client 

Composer will install the project and all its dependencies under the current directory., (*7)

Download an Archive File

You can also download a zip of the GIT Web Interface Client and unpack it somewhere under your web server root directory. You will still need to run composer to download other dependencies., (*8)

$ curl -s http://getcomposer.org/installer | php
$ php -d memory_limit=-1 composer.phar install

or if composer is install globally

$ composer install

You will be prompted to enter in the database configuration. Please check the app/config/parameters.yml to make sure that the database settings are correct, (*9)

3) Checking your System Configuration

Execute the check.php script from the command line, to check your system config:, (*10)

$ php app/check.php

The script returns a status code of 0 if all mandatory requirements are met, 1 otherwise., (*11)

4) Install the database

If the database is not already created run:, (*12)

$ php app/console doctrine:database:create

To install the schema and inital data run the following command:, (*13)

$ php app/console version:install

To create a new administrator run the following command:, (*14)

$ php app/console version:admin:create

5) Web Server

Below are examples of 3 different web servers configurations that you can use:, (*15)

Apache Example Config

The minimum configuration to get the application running under Apache is, (*16)

    <VirtualHost *:80>
        ServerName domain.tld
        ServerAlias www.domain.tld

        DocumentRoot /var/www/project/web
        <Directory /var/www/project/web>
            AllowOverride All
            Order Allow,Deny
            Allow from All
        </Directory>

        # uncomment the following lines if you install assets as symlinks
        # or run into problems when compiling LESS/Sass/CoffeScript assets
        # <Directory /var/www/project>
        #     Options FollowSymlinks
        # </Directory>

        ErrorLog /var/log/apache2/project_error.log
        CustomLog /var/log/apache2/project_access.log combined
    </VirtualHost>

Check out Symfony 2 web config page for more details, (*17)

Nginx Example Config

The minimum configuration to get the application running under Nginx is, (*18)

    server {
        server_name domain.tld www.domain.tld;
        root /var/www/project/web;

        location / {
            # try to serve file directly, fallback to app.php
            try_files $uri /app.php$is_args$args;
        }
        # DEV
        # This rule should only be placed on your development environment
        # In production, don't include this and don't deploy app_dev.php or config.php
        location ~ ^/(app_dev|config)\.php(/|$) {
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_split_path_info ^(.+\.php)(/.*)$;
            include fastcgi_params;
            # When you are using symlinks to link the document root to the
            # current version of your application, you should pass the real
            # application path instead of the path to the symlink to PHP
            # FPM.
            # Otherwise, PHP's OPcache may not properly detect changes to
            # your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126
            # for more information).
            fastcgi_param  SCRIPT_FILENAME  $realpath_root$fastcgi_script_name;
            fastcgi_param DOCUMENT_ROOT $realpath_root;
        }
        # PROD
        location ~ ^/app\.php(/|$) {
            fastcgi_pass unix:/var/run/php5-fpm.sock;
            fastcgi_split_path_info ^(.+\.php)(/.*)$;
            include fastcgi_params;
            # When you are using symlinks to link the document root to the
            # current version of your application, you should pass the real
            # application path instead of the path to the symlink to PHP
            # FPM.
            # Otherwise, PHP's OPcache may not properly detect changes to
            # your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126
            # for more information).
            fastcgi_param  SCRIPT_FILENAME  $realpath_root$fastcgi_script_name;
            fastcgi_param DOCUMENT_ROOT $realpath_root;
            # Prevents URIs that include the front controller. This will 404:
            # http://domain.tld/app.php/some-path
            # Remove the internal directive to allow URIs like this
            internal;
        }

        error_log /var/log/nginx/project_error.log;
        access_log /var/log/nginx/project_access.log;
    }

Php Web Server

If you just want to test out the application you can use the default php webserver. You will not need to configure anything, but this will run slower:, (*19)

    $ php app/console server:run

5) Done

Congratulations! You're now ready to use the Version Control System., (*20)

Windows Install:

If you install this onto a windows machine using WAMP you will have issues with connection to remote repositories using a ssh key. To resolve this check out /Documentation/WindowsGit.md, (*21)

Testing:

To run phpunit test you will need a test database. Run the following command:, (*22)

$ php app/console doctrine:database:create --env=test

To install the schema and inital data run the following command:, (*23)

$ php app/console version:install --env=test

$ php app/console doctrine:fixtures:load --env=test

The Versions