Skip to content

Latest commit

 

History

History
59 lines (44 loc) · 1.33 KB

README.md

File metadata and controls

59 lines (44 loc) · 1.33 KB

Boulbicup

Management website made for Ice Hockey tournaments at Boulogne-Billancourt (France)

Not deployed yet

Install development environnement

Requirements

  • Working Web Server with PHP >= 7.2 (Apache, Nginx, other...)
  • Working Database Server (like MySQL, Postgres, other...)
  • Composer installed

Installation

  • Clone the repository
git clone https://github.com/Tchekda/Boulbicup.git
  • Go inside the directory
cd Boulbicup
  • Install PHP dependencies
composer install --dev
  • Define environment variable DATABASE_URL (like mysql://boulbicup:password@localhost/boulbicup)

  • Run doctrine database population

vendor/bin/doctrine orm:schema-tool:create
  • Create initial Admin account with a PHP script at the root of the project
<?php
// adminaccount.php

require_once 'vendor/autoload.php';
require_once 'bootstrap.php';

$user = new Entity\User();
$user->setUsername('Username');
$user->setPassword(password_hash('YourPassword', PASSWORD_ARGON2ID));

$entityManager->persist($user);
$entityManager->flush();

echo "Created user " . $user->getId() . " with ID " . $user->getId() . "\r\n";
  • Run the admin script
php adminaccount.php
  • Visit the website as configured in your webserver and enjoy!