Skip to main content

Server Requirements

StrikePractice-Web has a few system requirements. You should ensure that your web server has the following minimum PHP version and extensions:

  • PHP >= 7.4
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Mbstring PHP Extension
  • Composer

Installation

As StrikePractice-Web uses Lumen, in-depth installation documentation can be found here

There are multiple methods of installation to choose from:

After installation please ensure that your .env is NOT accessible.

Graphical

Graphical installation is the simplest installation method.

  1. Drop the files onto your web server outside of the public directory
  2. Run $ composer install --no-dev within the directory
  3. Run $ php artisan installer:install <public install dir e.g. ../public_html/stats> or move the public directory into where you want the page to be accessible
  4. If you're on NGINX then you'll need to configure the path (an example configuration can be found in nginx.example.conf)
  5. Visit the associated domain and follow the installation steps.

The installation will be locked once the installer has finished, this is to prevent abuse; you can unlock your installation either by running $ php artisan installer:unlock or deleting storage/app/install.lock

Headless

Headless installation is slightly more complex but can be helpful for a rapid deployment

  1. Drop the files onto your web server
  2. Run $ composer install --no-dev within the directory
  3. Copy the .env.example file and call it .env then fill in the database details
  4. Run $ php artisan installer:copy-installation to copy the installation template over (doing this automatically locks your installation)
  5. Edit the template within config/strikepractice-web.php

Docker

Docker installation is useful for environments where most of your services are already running in docker; the included compose file doesn't include a database.

  1. Edit the docker-compose.{nginx/apache}.yml to suit your needs
  2. Run docker-compose -f docker-compose.{nginx/apache}.yml up
  3. Configure your reverse proxy to point to the instance (if you're using docker we expect you to know how to do this)

### Extra Information

If you wish to access a database which isn't hosted within docker then you can pass extra hosts through to the container

extra_hosts:
- "host.docker.internal:host-gateway"

Environment Variables

VariableAccepted ValuesDescriptionExample
APP_ENVproduction, developmentThe environment that the app is currently hosted in
APP_DEBUGtrue, falseWhether debug mode is enabled or not
APP_URLThe URL the app is running at"https://stats.practice.com", "https://practice.com/stats"
DB_HOSTThe hostname the database is running on"localhost"
DB_PORTThe port the database is running on3306
DB_DATABASEThe database name"strikepractice"
DB_USERNAMEThe user to access the database with"strikepractice_web"
DB_PASSWORDThe password to access the database with
FORCE_URL_SCHEMEhttp, httpsThe URL schema to enforce on URLs (primarily for reverse proxies)
FORCE_URL_ROOTThe URL root to enforce (primarily for reverse proxies)"https://practice.com/stats"