-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
271 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,162 @@ | ||
# Configuration | ||
|
||
## About | ||
|
||
All system settings are stored in the .env file, this guide will go through any of the settings, and explain how they are configured. | ||
|
||
Please keep in mind that settings are cached, and any time you update them, you should update the cache: | ||
`php artisan optimize` | ||
|
||
## Config | ||
|
||
### APP_NAME | ||
|
||
The name of the site, can be any string. Should be in single quotes if there is a space in it. | ||
|
||
### APP_ENV | ||
|
||
Should not change, laravel default setting. | ||
|
||
### APP_KEY | ||
|
||
Generated using | ||
`php artisan key:generate` | ||
|
||
Should not be changed manually, but must not be null. | ||
|
||
### APP_DEBUG | ||
|
||
Enhanced debugging. Recommended to be false for live environments. | ||
|
||
### APP_URL | ||
|
||
The full URL of the site, for example https://360nohope.co.uk | ||
|
||
### APP_DEMO_MODE | ||
|
||
Enabled demo mode, which does a nightly data refresh. This should almost always be false. | ||
|
||
### AUTO_APPROVE_USERS | ||
|
||
A boolean value, this controls if users need approval to sign in, we recommend setting to 0. | ||
|
||
### LOG_CHANNEL | ||
|
||
Configures how keyshare logs it's config. Can be configured to any [laravel supported logging driver](https://laravel.com/docs/6.x/logging) | ||
|
||
### CACHE_DRIVER | ||
|
||
This should always be Redis. We recommend installing redis in our install guide. | ||
|
||
### QUEUE_CONNECTION=redis | ||
|
||
Not currently in use | ||
|
||
### BROADCAST_DRIVER | ||
|
||
Not currently in use | ||
|
||
### SESSION_DRIVER | ||
|
||
How sessions will be stored, we support all [laravel supported session drivers](https://laravel.com/docs/6.x/session). Redis is recommended. | ||
|
||
### SESSION_LIFETIME | ||
|
||
How long sessions last, recommended is 120 minutes. | ||
|
||
### TELESCOPE_ENABLED | ||
|
||
Enables laravel telescope, should be false for Live. | ||
|
||
### STEAM_LOGIN | ||
|
||
This enables steam login, however it requires the steam URLs and key to be set. | ||
|
||
### STEAM_KEY | ||
|
||
You need to generate a [steam api key](https://steamcommunity.com/dev/apikey) and insert the key here. | ||
|
||
### STEAM_SECRET | ||
|
||
The same as the Steam Key. | ||
|
||
### STEAM_REDIRECT_URI | ||
|
||
This is the URL the site redirects to. it should be the full site name, with /login/steam/callback on the end. For example: | ||
`STEAM_REDIRECT_URI=https://360nohope.co.uk/login/steam/callback` | ||
|
||
## Database Connections | ||
|
||
We support any [laravel supported DB driver](https://laravel.com/docs/6.x/database). We recommend MySQL. | ||
|
||
### DB_CONNECTION | ||
|
||
Driver Name, as in the above laravel guide. | ||
|
||
### DB_HOST | ||
|
||
DB Server Name | ||
|
||
### DB_PORT | ||
|
||
DB Port | ||
|
||
### DB_DATABASE | ||
|
||
Database Name | ||
|
||
### DB_USERNAME | ||
|
||
Database username | ||
|
||
### DB_PASSWORD | ||
|
||
Database password | ||
|
||
## Redis | ||
|
||
This will not need changing if you have installed locally, but you will need to update the following strings if you are hosting redis elsewhere: | ||
|
||
### REDIS_HOST | ||
|
||
Hostname of redis server | ||
|
||
### REDIS_PASSWORD | ||
|
||
Redis server password, if configured | ||
|
||
### REDIS_PORT | ||
|
||
Port for redis | ||
|
||
|
||
In order to use password resets, you should set up an SMTP server, the following details should be provided from your email provider. You can set up [Gmail](https://stackoverflow.com/questions/32515245/how-to-to-send-mail-using-gmail-in-laravel-5-1) | ||
|
||
### MAIL_DRIVER | ||
|
||
Should always be SMTP for live | ||
|
||
### MAIL_HOST | ||
|
||
Provided by your SMTP provider | ||
|
||
### MAIL_PORT | ||
|
||
Provided by your SMTP provider | ||
|
||
### MAIL_USERNAME | ||
|
||
Provided by your SMTP provider | ||
|
||
### MAIL_PASSWORD | ||
|
||
Provided by your SMTP provider | ||
|
||
### MAIL_ENCRYPTION | ||
|
||
Provided by your SMTP provider | ||
|
||
### MAIL_FROM_NAME | ||
|
||
The name of the sender when emails are received (Normally the site name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,95 @@ | ||
##To Be Added | ||
# Installation | ||
|
||
Currently the installation guide is only for Ubuntu Server. These can be adapted to use equivilent settings. We will be using Apache, but this can be replace by Nginx. You can use any SQL database supported by laravel, but here we will be using MySQL. | ||
|
||
We recommend that you read the [Laravel Deployment Docs](https://laravel.com/docs/6.x/deployment) before proceeding | ||
|
||
## Requirements | ||
|
||
You require PHP7+, MySQL (Or an Alternative DB Server supported by laravel), A Web Server (We will be using Apache), Composer and Redis. | ||
|
||
`sudo apt get install apache2 mysql-server php-pear php-fpm php-dev php-zip php-curl php-xmlrpc php-gd php-mysql php-mbstring php-xml libapache2-mod-php composer redis-server` | ||
|
||
This guide assumes that you have already created the MySQL database. | ||
|
||
## Install | ||
|
||
### Keyshare | ||
|
||
Clone laravel into a web folder, for example (/var/www/keyhsare): | ||
`cd /var/www` | ||
|
||
You can transfer the files one of two ways, cloing the repository, or downloading the latest release and copying the folder to the server. here we will be using git to clone the repository. | ||
|
||
Install git: | ||
`sudo apt get install git` | ||
|
||
Clone the git repository: | ||
`git clone github.com/andy3471/keyshare.git` | ||
|
||
Go Into Directory (Or open folder in VS Code, and use terminal -> new terminal): | ||
`cd keyshare` | ||
|
||
Install Composer Dependancies: | ||
`composer install --optimize-autoloader --no-dev` | ||
|
||
Copy .env.example File: | ||
`cp .env.example .env` | ||
|
||
You will need to edit the .env file to set your connection string settings: | ||
`nano .env` | ||
|
||
Enter the DB username, password and server that you have set up. If you have redis installed externally, you'll need to set up the connection to redis here too. Please see the [Configuration Guide](docs/CONFIG.md) to set up your settings, such as the Steam Login. | ||
|
||
Make the storage folder | ||
|
||
Create Storage link: | ||
`php artisan storage:link` | ||
|
||
Build the database: | ||
`php artisan migrate` | ||
|
||
Generate Key: | ||
`php artisan key:generate` | ||
|
||
Cache the settings: | ||
`php artisan optimize` | ||
|
||
### Configure Apache | ||
|
||
You'll need to configure Apache (or alternative) to use the Public directory. To do so, you'll need to either create a new site, or edit the default one in Apache. In this guide we'll edit the default. | ||
|
||
`cd /etc/apache2/sites-available` | ||
|
||
edit the default site file: | ||
`sudo nano 000-default.conf` | ||
|
||
Set the document root to the public folder created above, for example: | ||
`DocumentRoot /var/www/keyshare/public` | ||
|
||
Restart Apache | ||
`sudo service apache2 restart` | ||
|
||
## Config | ||
|
||
The site should now work. Any issues then please feel free to raise an issue on [GitHub](https://github.com/andy3471/keyshare/issues/new/choose). Please see the [Configuration Guide](docs/CONFIG.md) to set up your settings, such as the Steam Login. | ||
|
||
# Updating | ||
|
||
## About | ||
|
||
We recommend you take a full back up of the site files and the database before running an update. | ||
|
||
## Update | ||
|
||
This guide assumes you are using git for version management. If you have manually downloaded the files on the initial install, then you can download the new release from github manually again, and overwrite the files. In our case, we will pull the latest version: | ||
`cd /var/www/keyshare` | ||
`git pull` | ||
|
||
We then need to update the database: | ||
`php artisan migrate` | ||
|
||
We should then clear the cache, and cache any new settings: | ||
`php artisan optimize` | ||
|
||
The upgrade should now be complete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters