Skip to content

Commit 44dfcff

Browse files
Andrew HargraveAndrew Hargrave
authored andcommitted
Merge branch 'release/1.2.0'
2 parents 83cd922 + 4f0b155 commit 44dfcff

File tree

4 files changed

+271
-30
lines changed

4 files changed

+271
-30
lines changed

.env.example

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,19 @@ APP_ENV=local
33
APP_KEY=base64:Ul3UJpD9XUMg+zJbMwCKBDZdIEURPg2d014JJz1GaSg=
44
APP_DEBUG=true
55
APP_URL=http://keyshare.local
6-
APP_DEMO_MODE=false
7-
86
AUTO_APPROVE_USERS=1
9-
STEAM_LOGIN=0
10-
117
LOG_CHANNEL=stack
8+
BROADCAST_DRIVER=log
9+
CACHE_DRIVER=redis
10+
QUEUE_CONNECTION=redis
11+
SESSION_DRIVER=redis
12+
SESSION_LIFETIME=120
13+
TELESCOPE_ENABLED=false
14+
15+
STEAM_LOGIN=0
16+
STEAM_KEY=
17+
STEAM_SECRET=
18+
STEAM_REDIRECT_URI=http://keyshare.local/login/steam/callback
1219

1320
DB_CONNECTION=mysql
1421
DB_HOST=127.0.0.1
@@ -17,20 +24,10 @@ DB_DATABASE=homestead
1724
DB_USERNAME=homestead
1825
DB_PASSWORD=secret
1926

20-
BROADCAST_DRIVER=log
21-
CACHE_DRIVER=redis
22-
QUEUE_CONNECTION=redis
23-
SESSION_DRIVER=file
24-
SESSION_LIFETIME=120
25-
2627
REDIS_HOST=127.0.0.1
2728
REDIS_PASSWORD=null
2829
REDIS_PORT=6379
2930

30-
STEAM_KEY=
31-
STEAM_SECRET=
32-
STEAM_REDIRECT_URI
33-
3431
MAIL_DRIVER=smtp
3532
MAIL_HOST=smtp.mailtrap.io
3633
MAIL_PORT=2525
@@ -39,17 +36,7 @@ MAIL_PASSWORD=null
3936
MAIL_ENCRYPTION=null
4037
MAIL_FROM_NAME=
4138

42-
AWS_ACCESS_KEY_ID=
43-
AWS_SECRET_ACCESS_KEY=
44-
AWS_DEFAULT_REGION=us-east-1
45-
AWS_BUCKET=
46-
47-
PUSHER_APP_ID=
48-
PUSHER_APP_KEY=
49-
PUSHER_APP_SECRET=
50-
PUSHER_APP_CLUSTER=mt1
51-
5239
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
5340
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
5441

55-
TELESCOPE_ENABLED=true
42+

docs/CONFIG.md

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
# Configuration
2+
3+
## About
4+
5+
All system settings are stored in the .env file, this guide will go through any of the settings, and explain how they are configured.
6+
7+
Please keep in mind that settings are cached, and any time you update them, you should update the cache:
8+
`php artisan optimize`
9+
10+
## Config
11+
12+
### APP_NAME
13+
14+
The name of the site, can be any string. Should be in single quotes if there is a space in it.
15+
16+
### APP_ENV
17+
18+
Should not change, laravel default setting.
19+
20+
### APP_KEY
21+
22+
Generated using
23+
`php artisan key:generate`
24+
25+
Should not be changed manually, but must not be null.
26+
27+
### APP_DEBUG
28+
29+
Enhanced debugging. Recommended to be false for live environments.
30+
31+
### APP_URL
32+
33+
The full URL of the site, for example https://360nohope.co.uk
34+
35+
### APP_DEMO_MODE
36+
37+
Enabled demo mode, which does a nightly data refresh. This should almost always be false.
38+
39+
### AUTO_APPROVE_USERS
40+
41+
A boolean value, this controls if users need approval to sign in, we recommend setting to 0.
42+
43+
### LOG_CHANNEL
44+
45+
Configures how keyshare logs it's config. Can be configured to any [laravel supported logging driver](https://laravel.com/docs/6.x/logging)
46+
47+
### CACHE_DRIVER
48+
49+
This should always be Redis. We recommend installing redis in our install guide.
50+
51+
### QUEUE_CONNECTION=redis
52+
53+
Not currently in use
54+
55+
### BROADCAST_DRIVER
56+
57+
Not currently in use
58+
59+
### SESSION_DRIVER
60+
61+
How sessions will be stored, we support all [laravel supported session drivers](https://laravel.com/docs/6.x/session). Redis is recommended.
62+
63+
### SESSION_LIFETIME
64+
65+
How long sessions last, recommended is 120 minutes.
66+
67+
### TELESCOPE_ENABLED
68+
69+
Enables laravel telescope, should be false for Live.
70+
71+
### STEAM_LOGIN
72+
73+
This enables steam login, however it requires the steam URLs and key to be set.
74+
75+
### STEAM_KEY
76+
77+
You need to generate a [steam api key](https://steamcommunity.com/dev/apikey) and insert the key here.
78+
79+
### STEAM_SECRET
80+
81+
The same as the Steam Key.
82+
83+
### STEAM_REDIRECT_URI
84+
85+
This is the URL the site redirects to. it should be the full site name, with /login/steam/callback on the end. For example:
86+
`STEAM_REDIRECT_URI=https://360nohope.co.uk/login/steam/callback`
87+
88+
## Database Connections
89+
90+
We support any [laravel supported DB driver](https://laravel.com/docs/6.x/database). We recommend MySQL.
91+
92+
### DB_CONNECTION
93+
94+
Driver Name, as in the above laravel guide.
95+
96+
### DB_HOST
97+
98+
DB Server Name
99+
100+
### DB_PORT
101+
102+
DB Port
103+
104+
### DB_DATABASE
105+
106+
Database Name
107+
108+
### DB_USERNAME
109+
110+
Database username
111+
112+
### DB_PASSWORD
113+
114+
Database password
115+
116+
## Redis
117+
118+
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:
119+
120+
### REDIS_HOST
121+
122+
Hostname of redis server
123+
124+
### REDIS_PASSWORD
125+
126+
Redis server password, if configured
127+
128+
### REDIS_PORT
129+
130+
Port for redis
131+
132+
## Email
133+
134+
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)
135+
136+
### MAIL_DRIVER
137+
138+
Should always be SMTP for live
139+
140+
### MAIL_HOST
141+
142+
Provided by your SMTP provider
143+
144+
### MAIL_PORT
145+
146+
Provided by your SMTP provider
147+
148+
### MAIL_USERNAME
149+
150+
Provided by your SMTP provider
151+
152+
### MAIL_PASSWORD
153+
154+
Provided by your SMTP provider
155+
156+
### MAIL_ENCRYPTION
157+
158+
Provided by your SMTP provider
159+
160+
### MAIL_FROM_NAME
161+
162+
The name of the sender when emails are received (Normally the site name)

docs/INSTALL.md

Lines changed: 95 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,95 @@
1-
##To Be Added
1+
# Installation
2+
3+
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.
4+
5+
We recommend that you read the [Laravel Deployment Docs](https://laravel.com/docs/6.x/deployment) before proceeding
6+
7+
## Requirements
8+
9+
You require PHP7+, MySQL (Or an Alternative DB Server supported by laravel), A Web Server (We will be using Apache), Composer and Redis.
10+
11+
`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`
12+
13+
This guide assumes that you have already created the MySQL database.
14+
15+
## Install
16+
17+
### Keyshare
18+
19+
Clone laravel into a web folder, for example (/var/www/keyhsare):
20+
`cd /var/www`
21+
22+
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.
23+
24+
Install git:
25+
`sudo apt get install git`
26+
27+
Clone the git repository:
28+
`git clone github.com/andy3471/keyshare.git`
29+
30+
Go Into Directory (Or open folder in VS Code, and use terminal -> new terminal):
31+
`cd keyshare`
32+
33+
Install Composer Dependancies:
34+
`composer install --optimize-autoloader --no-dev`
35+
36+
Copy .env.example File:
37+
`cp .env.example .env`
38+
39+
You will need to edit the .env file to set your connection string settings:
40+
`nano .env`
41+
42+
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.
43+
44+
Make the storage folder
45+
46+
Create Storage link:
47+
`php artisan storage:link`
48+
49+
Build the database:
50+
`php artisan migrate`
51+
52+
Generate Key:
53+
`php artisan key:generate`
54+
55+
Cache the settings:
56+
`php artisan optimize`
57+
58+
### Configure Apache
59+
60+
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.
61+
62+
`cd /etc/apache2/sites-available`
63+
64+
edit the default site file:
65+
`sudo nano 000-default.conf`
66+
67+
Set the document root to the public folder created above, for example:
68+
`DocumentRoot /var/www/keyshare/public`
69+
70+
Restart Apache
71+
`sudo service apache2 restart`
72+
73+
## Config
74+
75+
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.
76+
77+
# Updating
78+
79+
## About
80+
81+
We recommend you take a full back up of the site files and the database before running an update.
82+
83+
## Update
84+
85+
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:
86+
`cd /var/www/keyshare`
87+
`git pull`
88+
89+
We then need to update the database:
90+
`php artisan migrate`
91+
92+
We should then clear the cache, and cache any new settings:
93+
`php artisan optimize`
94+
95+
The upgrade should now be complete

readme.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ Currently, keyshare can be self hosted for one group. Users can sign in with a l
77
![ScreenShot](https://raw.github.com/andy3471/keyshare/master/docs/img/keyshare-gamelist.jpg)
88
[Try Out the Demo](https://keyshare.andyh.app)
99

10-
1110
## Technologies
1211

1312
Built on the Laravel PHP Framework, with Vue JS.
@@ -16,12 +15,11 @@ All development environments are running MySQL, Redis and Nginx. Laravel offers
1615

1716
## Install
1817

19-
[Install Guide (To Do)](docs/INSTALL.md)
20-
[Configuration (To Do)](docs/CONFIG.md)
18+
[Install Guide](docs/INSTALL.md)
19+
[Configuration](docs/CONFIG.md)
2120

2221
## Contributing
2322

2423
[Setting up a dev environment](docs/DEVENVIRONMENT.md)
2524
[Debugging](docs/DEBUG.md)
26-
[Running Tests (To Do)](docs/TESTS.md)
2725
[Contribution guidelines](docs/CONTRIBUTING.md)

0 commit comments

Comments
 (0)