-
Notifications
You must be signed in to change notification settings - Fork 23
Installing Hoot Draft
-
Download the latest release from the project releases page and extract the project to a temporary local directory.
-
Create an empty MySQL database and a corresponding MySQL user that has full access to this database.
-
Additionally, you should have a webserver (Apache, Nginx or IIS) setup to serve HTML and PHP. You will need to have the following items ready before beginning setup and deployment:
- The IP address or DNS name of the webserver the app will be served from (SSH must be enabled & keys created - see this article for help)
- Additionally, it's highly recommended for now to use SSH keys without passwords. Until Deployer supports it, it becomes a real hassle that ends up breaking an otherwise fine build process (it continually asks for your SSH key password, up to 20 times in a single build process)
- Yarn installed on your server
- Node installed on your server, versions 8 or above (also, see this AskUbuntu answer if you need help updating the version installed on your machine)
- PHP (preferably 7.0+) installed on your server and wired up to your web server of choice
- Both the
php-mysql
andphp-xml
PHP extensions enabled. To check, runphp -m | grep xml
andphp -m | grep mysql
- if each command returnsmysql
orxml
, they are installed. - A long, randomly generated JWT seed token (generate at least a 32-character token using a generator - Google can help :) )
- Google Recaptcha 2 registration, both public and private keys
- SMTP server credentials (like Mailgun )
- The absolute file path to the base directory the application will be stored on the webserver
-
IMPORTANT Requests from Apache/Nginx/IIS should be pointed to a symbolic link called
current
located within theyoursite.com
folder (/var/www/yoursite.com/current
, for example) which will be auto-created and updated during the Hoot Draft deployment. Ensure the SSH user has full write permission to this directory, too. - Within the
yoursite.com
folder on your server, multiple folders will (eventually, after multiple deployments) exist, each named a sequential number corresponding to the "build" contained within (so you will see folders1
and2
within theyoursite.com
folder after 2 deployments). The symbolic link (current
) will be automatically updated to point to the latest build during deployment.
-
IMPORTANT Requests from Apache/Nginx/IIS should be pointed to a symbolic link called
-
Open a command prompt or terminal on your computer, and navigate to the temporary local directory (same folder as
index.html
). Typevendor/bin/dep setup local
and hit enter to begin the automated Hoot Draft settings wizard. It will ask you questions in the terminal window, type in the answers and hit enter to save. -
If your Hoot Draft install will be at the base of the domain or subdomain (as in
sub.example.com
orwww.example.com
), you may skip this step. If your base URL looks likewww.example.com/phpdraft
, do the following:- Open
index.html
and find this HTML:<base href="/">
and change it to match the directory path after the base domain. So if your base URL iswww.example.com/phpdraft
, then you must edit the HTML like this:<base href="/phpdraft/">
- Open
-
Make any necessary changes to your
.htaccess
(Unix-like) orweb.config
(Windows) config files.- If you updated base
href
tag inindex.html
above, you'll need to edit line 5 of.htaccess
like so:RewriteBase /phpdraft
- If you updated base
-
(Optional) Once the settings wizard has finished, type
vendor/bin/dep backup local
to take the settings files the wizard created for you in the last step, and back them up in a secure folder elsewhere on this machine.
This is helpful when upgrading the app in the future, as you can import these settings before deploying the application. A good suggestion is within your logged in user's home folder (along side Documents and Downloads folders, for example) in a folder called "phpdraft_settings". If you have more than 1 install, you would need to keep them in separate folders within
phpdraft_settings
-
Time to deploy! For best results, ensure your current machine is on hardwired ethernet instead of wireless.
-
Type
vendor/bin/dep deploy local
and wait as the deployer automatically uploads the app, installs dependencies and updates the app database. If you receive a success message from the deployer, continue on!- Check the project Gitter chat, or ping Matt on Twitter for help in this process.
-
Go to the base URL of your Hoot Draft install and register a new user account with your email address.
-
In the
phpdraft
database, find the row in theusers
table that corresponds to your newly created account. Make three edits:- Change the value in the
enabled
column to1
(which will enable your account) - Change the value in the
roles
column toROLE_ADMIN,ROLE_COMMISH
(which will make your account both a site administrator and a commissioner) - Change the value in the
verificationKey
toNULL
(this deletes the key contained in the new user email sent to your email address - you don't need to validate your own email :) )
- Change the value in the
-
Log in with your email address and password.
-
In the top header bar, click on Admin Stuff then select Player Data. Using the CSV files contained in the
/resources/
directory, update each sport with the matching CSV file:
Sport | CSV File |
---|---|
Football (NFL) | ProPlayers_NFLStandard_20xx.csv |
Football - Extended Rosters (NFL) | ProPlayers_NFLExtended_20xx.csv |
Baseball (MLB) | ProPlayers_MLB_20xx.csv |
Basketball (NBA) | ProPlayers_NBA_20xx.csv |
Hockey (NHL) | ProPlayers_NHL_20xx.csv |
Rugby (Super15) | ProPlayers_Super15_20xx.csv |