MediaArea / MediaArea-Website

MediaArea Website
MIT License
2 stars 11 forks source link

MediaArea-Website

Build Status

How to install

Dependencies

Get sourcecode

From git

Clone MediaArea-Website repository

git clone https://github.com/MediaArea/MediaArea-Website.git

Install

MySQL

Create a user and a datable, give the user the all rights to this database.

CREATE USER '<USER>'@'<HOST>' IDENTIFIED BY '<PASSWORD>';
GRANT ALL ON `<DB>`.* TO '<USER>'@'<HOST>';
CREATE DATABASE IF NOT EXISTS `<DB>`;

Dependencies

Get dependencies with composer

cd YOUR_PATH/MediaArea-Website/
composer install

You'll get some configuration questions, you can use these fake values if you don't care about the payments.

SQL tables and assets

php bin/console doctrine:migrations:migrate --env=prod --no-interaction
php bin/console assetic:dump --env=prod

Apache

Add a vhost to access MediaArea-Website, like this minimal example :

<VirtualHost *:80>
    ServerName WWW.YOURWEBSITE.COM
    DocumentRoot "YOUR_PATH/MediaArea-Website/web/"
    <Directory "YOUR_PATH/MediaArea-Website/web/">
        AllowOverride All
        Options -Indexes
        <IfModule mod_authz_core.c>
          # Apache 2.4
            Require all granted
        </IfModule>
        <IfModule !mod_authz_core.c>
          # Apache 2.2
            Order allow,deny
            allow from all
        </IfModule>
    </Directory>
</VirtualHost>

Allow apache user to write in cache and log directory, some methods are explain in Symfony documentation

Doc

Translations

Translations are stored is XML format here one file per language

Template

Templates are in twig format, they are available here

Coding standard

MediaArea-Website follow PSR1 and PSR2 standard
The source code is analyzed with PHP Mess Detector with the rules in phpmd.xml and PHP-CS-Fixer with PSR1 and PSR2 rules

Cache

Remind to clear the cache after a modification :

php bin/console cache:clear --env=prod