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.
- Drop the files onto your web server outside of the public directory
- Run
$ composer install --no-dev
within the directory - 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 - If you're on NGINX then you'll need to configure the path (an example configuration can be found in
nginx.example.conf
) - 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
- Drop the files onto your web server
- Run
$ composer install --no-dev
within the directory - Copy the
.env.example
file and call it.env
then fill in the database details - Run
$ php artisan installer:copy-installation
to copy the installation template over (doing this automatically locks your installation) - 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.
- Edit the docker-compose.{nginx/apache}.yml to suit your needs
- Run
docker-compose -f docker-compose.{nginx/apache}.yml up
- 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
Variable | Accepted Values | Description | Example |
---|---|---|---|
APP_ENV | production, development | The environment that the app is currently hosted in | |
APP_DEBUG | true, false | Whether debug mode is enabled or not | |
APP_URL | The URL the app is running at | "https://stats.practice.com", "https://practice.com/stats" | |
DB_HOST | The hostname the database is running on | "localhost" | |
DB_PORT | The port the database is running on | 3306 | |
DB_DATABASE | The database name | "strikepractice" | |
DB_USERNAME | The user to access the database with | "strikepractice_web" | |
DB_PASSWORD | The password to access the database with | ||
FORCE_URL_SCHEME | http, https | The URL schema to enforce on URLs (primarily for reverse proxies) | |
FORCE_URL_ROOT | The URL root to enforce (primarily for reverse proxies) | "https://practice.com/stats" |