Coder Social home page Coder Social logo

grendias / free-bet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jbouzekri/free-bet

0.0 1.0 0.0 2.97 MB

A PHP application to provide fun betting on sports event in my company

License: MIT License

PHP 61.48% HTML 18.05% JavaScript 1.28% CSS 19.19%

free-bet's Introduction

Free Bet

Build Status Scrutinizer Code Quality

A simple PHP application to provide a betting system for sports events. You can easily install it in your company to have fun and see who is the best forecaster. For now, it focus on the 5 major european soccer league.

You can see a running demo on free-bet.bouzekri.net english version. The french translation is also available.

Prerequisites

A clean LAMP installation.

Warning : Here, M stands for MongoDB. You must have it installed with the php module.

For my environment development, I followed the MongoDB installation documentation : Read the doc.

For Mongo, run as root :

  • Import the public key used by the package management system.
apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
  • Create a /etc/apt/sources.list.d/mongodb.list file for MongoDB.
echo 'deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
  • Reload local package database.
apt-get update
  • Install the MongoDB packages.
apt-get install mongodb-org

For PHP Mongo client on Debian, run as root :

echo "deb http://ftp.de.debian.org/debian wheezy-backports main" >> /etc/apt/sources.list
apt-get update
apt-get install php5-mongo

For PHP Mongo client on Ubuntu, run as root :

apt-get install php5-mongo

The VirtualHost for apache is a standard one for symfony2

Installation

The following vhost is for apache 2.4. Adapt the Require section for old apache version.

Install and configure your symfony2 app

cd /var/www
git clone https://github.com/jbouzekri/free-bet.git --recursive
cd free-bet
php composer.phar install
php app/console assetic:dump
chown www-data:www-data app/{cache,logs} -R
chmod ug+rwx app/{cache,logs} -R
php app/console doctrine:mongodb:schema:create --db --index --collection
php app/console doctrine:mongodb:fixtures:load

Add the virtual host

vim /etc/apache2/site-available/free-bet.conf


<VirtualHost *:80>
    ServerName <your hostname>

    DocumentRoot /var/www/free-bet/web
    <Directory /var/www/free-bet/web>
        # enable the .htaccess rewrites
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog /var/log/apache2/error-free-bet.log
    CustomLog /var/log/apache2/access-free-bet.log combined
</VirtualHost>

Enable the virtual host

/etc/apache2/sites-enabled
ln -s /etc/apache2/sites-available/free-bet.conf
service apache2 restart

Go to the hostname configured. You can logged in as admin with the account admin/admin.

There is a cron task to configure. This task process all ended events and their gambles to determine which are winners.

php app/console gamble:process

You can launch it every hour for example

Roadmap

This is a work in progress so it is not finish. Coming soon :

  • User grouping and bet sharing
  • Social network submission
  • Complex Stats on events and competition : per person, and per group

free-bet's People

Contributors

jbouzekri avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.