mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-29 08:07:59 +01:00
T350: Updated configuration files for Laravel 5.
This commit is contained in:
parent
7147d06ee7
commit
e2225e3378
20 changed files with 288 additions and 36 deletions
|
@ -17,3 +17,8 @@ MAIL_PORT=2525
|
||||||
MAIL_USERNAME=null
|
MAIL_USERNAME=null
|
||||||
MAIL_PASSWORD=null
|
MAIL_PASSWORD=null
|
||||||
MAIL_ENCRYPTION=null
|
MAIL_ENCRYPTION=null
|
||||||
|
|
||||||
|
PONI_CLIENT_ID=null
|
||||||
|
PONI_CLIENT_SECRET=null
|
||||||
|
|
||||||
|
PONYFM_DATASTORE=null
|
||||||
|
|
|
@ -211,7 +211,7 @@ class Album extends Model
|
||||||
{
|
{
|
||||||
$dir = (string)(floor($this->id / 100) * 100);
|
$dir = (string)(floor($this->id / 100) * 100);
|
||||||
|
|
||||||
return \Config::get('app.files_directory') . '/tracks/' . $dir;
|
return \Config::get('ponyfm.files_directory') . '/tracks/' . $dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDates()
|
public function getDates()
|
||||||
|
|
|
@ -17,7 +17,7 @@ use Illuminate\Support\Str;
|
||||||
use Input;
|
use Input;
|
||||||
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||||
|
|
||||||
//require_once(app_path() . '/Library/getid3/getid3/getid3.php');
|
require_once(app_path() . '/Library/getid3/getid3/getid3.php');
|
||||||
|
|
||||||
class ImportMLPMA extends Command
|
class ImportMLPMA extends Command
|
||||||
{
|
{
|
||||||
|
@ -82,8 +82,8 @@ class ImportMLPMA extends Command
|
||||||
{
|
{
|
||||||
pcntl_signal(SIGINT, [$this, 'handleInterrupt']);
|
pcntl_signal(SIGINT, [$this, 'handleInterrupt']);
|
||||||
|
|
||||||
$mlpmaPath = Config::get('app.files_directory') . 'mlpma';
|
$mlpmaPath = Config::get('ponyfm.files_directory') . 'mlpma';
|
||||||
$tmpPath = Config::get('app.files_directory') . 'tmp';
|
$tmpPath = Config::get('ponyfm.files_directory') . 'tmp';
|
||||||
|
|
||||||
if (!File::exists($tmpPath)) {
|
if (!File::exists($tmpPath)) {
|
||||||
File::makeDirectory($tmpPath);
|
File::makeDirectory($tmpPath);
|
||||||
|
|
|
@ -376,7 +376,7 @@ class MigrateOldData extends Command
|
||||||
{
|
{
|
||||||
$dir = (string)(floor($id / 100) * 100);
|
$dir = (string)(floor($id / 100) * 100);
|
||||||
|
|
||||||
return \Config::get('app.files_directory') . '/' . $type . '/' . $dir;
|
return \Config::get('ponyfm.files_directory') . '/' . $type . '/' . $dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,7 @@ class Image extends Model
|
||||||
{
|
{
|
||||||
$dir = (string)(floor($this->id / 100) * 100);
|
$dir = (string)(floor($this->id / 100) * 100);
|
||||||
|
|
||||||
return Config::get('app.files_directory') . '/images/' . $dir;
|
return Config::get('ponyfm.files_directory') . '/images/' . $dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function ensureDirectoryExists()
|
public function ensureDirectoryExists()
|
||||||
|
|
22
app/Library/getid3/.gitattributes
vendored
Executable file
22
app/Library/getid3/.gitattributes
vendored
Executable file
|
@ -0,0 +1,22 @@
|
||||||
|
# Auto detect text files and perform LF normalization
|
||||||
|
* text=auto
|
||||||
|
|
||||||
|
# Custom for Visual Studio
|
||||||
|
*.cs diff=csharp
|
||||||
|
*.sln merge=union
|
||||||
|
*.csproj merge=union
|
||||||
|
*.vbproj merge=union
|
||||||
|
*.fsproj merge=union
|
||||||
|
*.dbproj merge=union
|
||||||
|
|
||||||
|
# Standard to msysgit
|
||||||
|
*.doc diff=astextplain
|
||||||
|
*.DOC diff=astextplain
|
||||||
|
*.docx diff=astextplain
|
||||||
|
*.DOCX diff=astextplain
|
||||||
|
*.dot diff=astextplain
|
||||||
|
*.DOT diff=astextplain
|
||||||
|
*.pdf diff=astextplain
|
||||||
|
*.PDF diff=astextplain
|
||||||
|
*.rtf diff=astextplain
|
||||||
|
*.RTF diff=astextplain
|
167
app/Library/getid3/.gitignore
vendored
Executable file
167
app/Library/getid3/.gitignore
vendored
Executable file
|
@ -0,0 +1,167 @@
|
||||||
|
helperapps/sha1sum.exe
|
||||||
|
helperapps/*.dll
|
||||||
|
|
||||||
|
|
||||||
|
#################
|
||||||
|
## Eclipse
|
||||||
|
#################
|
||||||
|
|
||||||
|
*.pydevproject
|
||||||
|
.project
|
||||||
|
.metadata
|
||||||
|
bin/
|
||||||
|
tmp/
|
||||||
|
*.tmp
|
||||||
|
*.bak
|
||||||
|
*.swp
|
||||||
|
*~.nib
|
||||||
|
local.properties
|
||||||
|
.classpath
|
||||||
|
.settings/
|
||||||
|
.loadpath
|
||||||
|
|
||||||
|
# External tool builders
|
||||||
|
.externalToolBuilders/
|
||||||
|
|
||||||
|
# Locally stored "Eclipse launch configurations"
|
||||||
|
*.launch
|
||||||
|
|
||||||
|
# CDT-specific
|
||||||
|
.cproject
|
||||||
|
|
||||||
|
# PDT-specific
|
||||||
|
.buildpath
|
||||||
|
|
||||||
|
|
||||||
|
#################
|
||||||
|
## Visual Studio
|
||||||
|
#################
|
||||||
|
|
||||||
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
|
## files generated by popular Visual Studio add-ons.
|
||||||
|
|
||||||
|
# User-specific files
|
||||||
|
*.suo
|
||||||
|
*.user
|
||||||
|
*.sln.docstates
|
||||||
|
|
||||||
|
# Build results
|
||||||
|
[Dd]ebug/
|
||||||
|
[Rr]elease/
|
||||||
|
*_i.c
|
||||||
|
*_p.c
|
||||||
|
*.ilk
|
||||||
|
*.meta
|
||||||
|
*.obj
|
||||||
|
*.pch
|
||||||
|
*.pdb
|
||||||
|
*.pgc
|
||||||
|
*.pgd
|
||||||
|
*.rsp
|
||||||
|
*.sbr
|
||||||
|
*.tlb
|
||||||
|
*.tli
|
||||||
|
*.tlh
|
||||||
|
*.tmp
|
||||||
|
*.vspscc
|
||||||
|
.builds
|
||||||
|
*.dotCover
|
||||||
|
|
||||||
|
## TODO: If you have NuGet Package Restore enabled, uncomment this
|
||||||
|
#packages/
|
||||||
|
|
||||||
|
# Visual C++ cache files
|
||||||
|
ipch/
|
||||||
|
*.aps
|
||||||
|
*.ncb
|
||||||
|
*.opensdf
|
||||||
|
*.sdf
|
||||||
|
|
||||||
|
# Visual Studio profiler
|
||||||
|
*.psess
|
||||||
|
*.vsp
|
||||||
|
|
||||||
|
# ReSharper is a .NET coding add-in
|
||||||
|
_ReSharper*
|
||||||
|
|
||||||
|
# Installshield output folder
|
||||||
|
[Ee]xpress
|
||||||
|
|
||||||
|
# DocProject is a documentation generator add-in
|
||||||
|
DocProject/buildhelp/
|
||||||
|
DocProject/Help/*.HxT
|
||||||
|
DocProject/Help/*.HxC
|
||||||
|
DocProject/Help/*.hhc
|
||||||
|
DocProject/Help/*.hhk
|
||||||
|
DocProject/Help/*.hhp
|
||||||
|
DocProject/Help/Html2
|
||||||
|
DocProject/Help/html
|
||||||
|
|
||||||
|
# Click-Once directory
|
||||||
|
publish
|
||||||
|
|
||||||
|
# Others
|
||||||
|
[Bb]in
|
||||||
|
[Oo]bj
|
||||||
|
sql
|
||||||
|
TestResults
|
||||||
|
*.Cache
|
||||||
|
ClientBin
|
||||||
|
stylecop.*
|
||||||
|
~$*
|
||||||
|
*.dbmdl
|
||||||
|
Generated_Code #added for RIA/Silverlight projects
|
||||||
|
|
||||||
|
# Backup & report files from converting an old project file to a newer
|
||||||
|
# Visual Studio version. Backup files are not needed, because we have git ;-)
|
||||||
|
_UpgradeReport_Files/
|
||||||
|
Backup*/
|
||||||
|
UpgradeLog*.XML
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
############
|
||||||
|
## Windows
|
||||||
|
############
|
||||||
|
|
||||||
|
# Windows image file caches
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# Folder config file
|
||||||
|
Desktop.ini
|
||||||
|
|
||||||
|
|
||||||
|
#############
|
||||||
|
## Python
|
||||||
|
#############
|
||||||
|
|
||||||
|
*.py[co]
|
||||||
|
|
||||||
|
# Packages
|
||||||
|
*.egg
|
||||||
|
*.egg-info
|
||||||
|
dist
|
||||||
|
build
|
||||||
|
eggs
|
||||||
|
parts
|
||||||
|
bin
|
||||||
|
var
|
||||||
|
sdist
|
||||||
|
develop-eggs
|
||||||
|
.installed.cfg
|
||||||
|
|
||||||
|
# Installer logs
|
||||||
|
pip-log.txt
|
||||||
|
|
||||||
|
# Unit test / coverage reports
|
||||||
|
.coverage
|
||||||
|
.tox
|
||||||
|
|
||||||
|
#Translations
|
||||||
|
*.mo
|
||||||
|
|
||||||
|
#Mr Developer
|
||||||
|
.mr.developer.cfg
|
||||||
|
|
||||||
|
# Mac crap
|
||||||
|
.DS_Store
|
|
@ -483,7 +483,7 @@ class Track extends Model
|
||||||
{
|
{
|
||||||
$dir = (string)(floor($this->id / 100) * 100);
|
$dir = (string)(floor($this->id / 100) * 100);
|
||||||
|
|
||||||
return \Config::get('app.files_directory') . '/tracks/' . $dir;
|
return \Config::get('ponyfm.files_directory') . '/tracks/' . $dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getDates()
|
public function getDates()
|
||||||
|
|
|
@ -94,7 +94,7 @@ class TrackFile extends Model
|
||||||
{
|
{
|
||||||
$dir = (string)(floor($this->track_id / 100) * 100);
|
$dir = (string)(floor($this->track_id / 100) * 100);
|
||||||
|
|
||||||
return \Config::get('app.files_directory') . '/tracks/' . $dir;
|
return \Config::get('ponyfm.files_directory') . '/tracks/' . $dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFile()
|
public function getFile()
|
||||||
|
|
|
@ -26,7 +26,7 @@ return [
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'url' => 'http://pony.fm',
|
'url' => env('APP_URL', 'https://pony.fm'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
@ -78,9 +78,9 @@ return [
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'key' => env('APP_KEY', 'AQUSDTDK5xA04yb9eO9iwlm72NpC8e90'),
|
'key' => env('APP_KEY'),
|
||||||
|
|
||||||
'cipher' => 'AES-256-CBC',
|
'cipher' => MCRYPT_RIJNDAEL_256,
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
@ -74,6 +74,6 @@ return [
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'prefix' => 'laravel',
|
'prefix' => 'ponyfm',
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
return [
|
return [
|
||||||
'version' => 1,
|
'version' => 1,
|
||||||
'urls' => [
|
'urls' => [
|
||||||
'api' => '',
|
'api' => env('PONI_API_URL', 'https://api.poniverse.net/v1/'),
|
||||||
'auth' => '',
|
'register' => env('PONI_REGISTER_URL', 'https://poniverse.net/register?site=pony.fm'),
|
||||||
'token' => ''
|
'auth' => env('PONI_AUTH_URL', 'https://poniverse.net/oauth/authorize'),
|
||||||
],
|
'token' => env('PONI_TOKEN_URL', 'https://poniverse.net/oauth/access_token')
|
||||||
'client_id' => 0,
|
],
|
||||||
'secret' => ''
|
'client_id' => env('PONI_CLIENT_ID'),
|
||||||
];
|
'secret' => env('PONI_CLIENT_SECRET')
|
||||||
|
];
|
||||||
|
|
31
config/ponyfm.php
Normal file
31
config/ponyfm.php
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Filesystem Datastore
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Pony.fm stores audio and image files in a directory it has read/write
|
||||||
|
| access to. This is the path to it.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'files_directory' => env('PONYFM_DATASTORE'),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Use sendfile?
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| sendfile is a way of letting the web server serve files that aren't
|
||||||
|
| normally in its document root. If the web server is configured for it,
|
||||||
|
| use this setting - otherwise, track files and images will be served by
|
||||||
|
| the PHP process.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'sendfile' => env('USE_SENDFILE', true),
|
||||||
|
|
||||||
|
];
|
|
@ -109,7 +109,7 @@ return [
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'cookie' => 'laravel_session',
|
'cookie' => 'IfYouAreReadingThisWeWantToWorkWithYou_PleaseDropAnEmailTo_HelloAtPoniverseDotNet',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
@ -98,11 +98,11 @@
|
||||||
@section('scripts')
|
@section('scripts')
|
||||||
<script>
|
<script>
|
||||||
window.pfm = {
|
window.pfm = {
|
||||||
token: "{{Session::token()}}",
|
token: "{!! csrf_token() !!}",
|
||||||
auth: {
|
auth: {
|
||||||
@if (Auth::check())
|
@if (Auth::check())
|
||||||
isLogged: true,
|
isLogged: true,
|
||||||
user: {{Auth::user()->toJson()}}
|
user: {!! Auth::user()->toJson() !!}
|
||||||
@else
|
@else
|
||||||
isLogged: false
|
isLogged: false
|
||||||
@endif
|
@endif
|
||||||
|
|
24
vagrant/.env.local
Normal file
24
vagrant/.env.local
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
APP_ENV=local
|
||||||
|
APP_DEBUG=true
|
||||||
|
APP_KEY=AQUSDTDK5xA04yb9eO9iwlm72NpC8e90
|
||||||
|
|
||||||
|
DB_HOST=localhost
|
||||||
|
DB_DATABASE=homestead
|
||||||
|
DB_USERNAME=homestead
|
||||||
|
DB_PASSWORD=secret
|
||||||
|
|
||||||
|
CACHE_DRIVER=file
|
||||||
|
SESSION_DRIVER=file
|
||||||
|
QUEUE_DRIVER=sync
|
||||||
|
|
||||||
|
MAIL_DRIVER=smtp
|
||||||
|
MAIL_HOST=mailtrap.io
|
||||||
|
MAIL_PORT=2525
|
||||||
|
MAIL_USERNAME=null
|
||||||
|
MAIL_PASSWORD=null
|
||||||
|
MAIL_ENCRYPTION=null
|
||||||
|
|
||||||
|
PONI_CLIENT_ID=AAopdYDbn6JarV0Wo025gYQNxS1VXcj8GCa0raSC
|
||||||
|
PONI_CLIENT_SECRET=cxlA1jgGRZEPp8hg4VNB5v2gx7aY6DUtJSwUUHzT
|
||||||
|
|
||||||
|
PONYFM_DATASTORE=/vagrant-files
|
|
@ -1,3 +1,4 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
sudo cp /vagrant/vagrant/pony.fm.nginx.config /etc/nginx/nginx.conf
|
sudo cp /vagrant/vagrant/pony.fm.nginx.config /etc/nginx/nginx.conf
|
||||||
sudo cp /vagrant/vagrant/pony.fm.nginx.site.config /etc/nginx/sites-enabled/pony.fm
|
sudo cp /vagrant/vagrant/pony.fm.nginx.site.config /etc/nginx/sites-enabled/pony.fm
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ cd /vagrant
|
||||||
/usr/local/bin/composer self-update
|
/usr/local/bin/composer self-update
|
||||||
composer install
|
composer install
|
||||||
|
|
||||||
cp -r /vagrant/vagrant/config/* "/vagrant/app/config/local"
|
cp "/vagrant/vagrant/.env.local" "/vagrant/.env"
|
||||||
|
|
||||||
php artisan migrate
|
php artisan migrate
|
||||||
php artisan db:seed
|
php artisan db:seed
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
cd ../
|
cd ../
|
||||||
vagrant ssh -c /vagrant/vagrant/copy-and-restart-configs.sh
|
vagrant ssh -c /vagrant/vagrant/copy-and-restart-configs.sh
|
Loading…
Reference in a new issue