/SquadIT.WebApp

SquadIT is a web application that makes managing your sports squad easy!

Primary LanguagePHPMIT LicenseMIT

Build Status Coverage Status Scrutinizer Code Quality

SquadIT

SquadIT is a web application that makes managing your sports squad easy!

  • Read all about it here
  • Follow the process in our Blog

This repository contains the package for the WebApp, based on the Flow Framework. If you want to use SquadIT, you can use our hosted service or you can install it on your own server.


Docker

This software ships as a handy docker image which you can download and run right away. To run the software as docker container use the following command:

docker run -dit -p 8080:80 0rickyy0/squadit

Edit ports accordingly - in production you might want to enable https traffic through port 443 and http traffic through port 80.

Installation

Environment setup

Make sure to read the following instructions carefully (also the linked ones), as most difficulties are related to an improperly setup environment.

  • As SquadIT is built on the foundation of Flow you need to setup your server to match it's requirements. In addition to the instructions in this document, consider the Flow Framework installation instructions. Furthermore, SquadIT needs imagick to do image processing, so make sure this is installed on your system.

  • Package management is done by composer. To install it, follow the installation instructions. If you're on a linux system (which you should be), in most cases the installation of composer is as simple as ~$ curl -s https://getcomposer.org/installer | php

Application

To install the application execute the following commands:

  • Get the framework's base distribution
    ~$ composer create-project --no-install neos/flow-base-distribution:~4.1.0 <INSTALL_DIR>
    ~$ cd <INSTALL_DIR>

  • Add the Github repo for SquadIT
    ~$ composer config repositories.squadit vcs https://github.com/PalatinCoder/SquadIT.WebApp.git

  • Add the SquadIT package
    ~$ composer require --no-update squadit/webapp:dev-master

  • Remove the flow welcome package
    ~$ composer remove --no-update neos/welcome

  • Now install all the packages
    ~$ composer install --no-dev

Checking the installation

You can do a quick test of your installation by doing ~$ ./flow and see if the CLI comes up without any errors.
Commonly there are problems with file permissions. You can fix them by executing
~$ sudo flow core:setfilepermissions <cli-user> <webserver-user> <webserver-group>

Setting up the database

You need to tell Flow how it can connect to the database. Put the following configuration into Configuration/Settings.yaml: (assuming you're using mysql, otherwise adjust accordingly)

Neos:
  Flow:
    persistence:
      backendOptions:
        driver: pdo_mysql
        host: 127.0.0.1
        user: <db_user>
        password: <db_password>
        dbname: <db_name>

Setting up the webserver

Now that Flow works fine you need to set up the web server. Set up a vhost in the directory <INSTALL_DIR>/Web/. Make sure you allow url rewriting and symlinks. For apache, a vhost could look like this:

<VirtualHost *:80>
    ServerName squadit.example.com
    ServerAdmin admin@squadit.example.com
    DocumentRoot /var/www/squadit/Web
    <Directory /var/www/squadit/Web>
        AllowOverride FileInfo Options
        Options +FollowSymlinks
    </Directory>
</VirtualHost>

Go!

Now SquadIT should by fully setup and ready for use on your server. Have fun!