Skip to content
This repository has been archived by the owner on Oct 6, 2023. It is now read-only.

InsaLan/insalan.fr

Repository files navigation

insalan.fr

Build Status Maintainability Test Coverage

Website to handle esport tournament

Installation

The project need the following packages and php-extensions :

Package Comment
git
php php7.2
composer
mariadb-server if use with local database
zip not necessary (only for unzip during install)
PHP extension Comment
php-curl
php-intl date translation
php-mbstring doctrine:create:schema:create
php-mysql
php-xml

Linux

Base packages

Update your local packages

sudo apt-get update && apt-get upgrade

Install git and clone the repository

sudo apt-get install git
git clone https://github.com/InsaLan/insalan.fr

It is recommended to get composer.phar in your PATH : https://getcomposer.org/doc/00-intro.md

Install the remaining packages

sudo apt-get install php7.2 php7.2-curl php7.2-intl php7.2-mbstring php7.2-mysql php7.2-xml mariadb-server zip

Proceed with the install and accept default settings

cd insalan.fr
composer.phar install

At this point, you should be able to run the web server but any pages you try to access will return an error since the database is not setup.

mariadb

Log in mariadb as root

sudo mysql -u root -p

Create database, user and grant access

CREATE DATABASE insalan;
CREATE USER insalan@'localhost';
GRANT ALL PRIVILEGES ON insalan.* to insalan@'localhost';

Fill database and run

Load fixtures (php-mbstring needed)

php bin/console doctrine:schema:create
php bin/console doctrine:fixtures:load

Install assets

php bin/console assets:install #dev
php bin/console assetic:dump #prod

Clear cache

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

If you have troubles with memory size allowed, do this

php -d memory_limit=-1 bin/console cache:clear #dev

Launch development server

php bin/console server:run #localhost only
php bin/console server:run 0.0.0.0 #available for everyone on port 8000

You can also use the php builtin development web server :

cd web
php -S localhost:8000 -t ../

Browse to http://localhost:8000/web/app_dev.php

Windows

TODO http://www.wampserver.com/ should be able to provide everything you need.

Contributing

If you wish to contribute to the insalan.fr project, refer to this file.

Database

List databases

php bin/console sonata:admin:list

Show database schema and links with other databases

php bin/console sonata:admin:explain sonata.admin.tournament.group