mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-22 04:58:01 +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
|
@ -16,4 +16,9 @@ MAIL_HOST=mailtrap.io
|
|||
MAIL_PORT=2525
|
||||
MAIL_USERNAME=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);
|
||||
|
||||
return \Config::get('app.files_directory') . '/tracks/' . $dir;
|
||||
return \Config::get('ponyfm.files_directory') . '/tracks/' . $dir;
|
||||
}
|
||||
|
||||
public function getDates()
|
||||
|
@ -316,4 +316,4 @@ class Album extends Model
|
|||
{
|
||||
return 'album-' . $this->id . '-' . $key;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ use Illuminate\Support\Str;
|
|||
use Input;
|
||||
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
|
||||
{
|
||||
|
@ -82,8 +82,8 @@ class ImportMLPMA extends Command
|
|||
{
|
||||
pcntl_signal(SIGINT, [$this, 'handleInterrupt']);
|
||||
|
||||
$mlpmaPath = Config::get('app.files_directory') . 'mlpma';
|
||||
$tmpPath = Config::get('app.files_directory') . 'tmp';
|
||||
$mlpmaPath = Config::get('ponyfm.files_directory') . 'mlpma';
|
||||
$tmpPath = Config::get('ponyfm.files_directory') . 'tmp';
|
||||
|
||||
if (!File::exists($tmpPath)) {
|
||||
File::makeDirectory($tmpPath);
|
||||
|
@ -497,4 +497,4 @@ class ImportMLPMA extends Command
|
|||
];
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -376,7 +376,7 @@ class MigrateOldData extends Command
|
|||
{
|
||||
$dir = (string)(floor($id / 100) * 100);
|
||||
|
||||
return \Config::get('app.files_directory') . '/' . $type . '/' . $dir;
|
||||
return \Config::get('ponyfm.files_directory') . '/' . $type . '/' . $dir;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -158,4 +158,4 @@ Route::group(['domain' => 'api.pony.fm'], function() {
|
|||
Route::get('tracks/popular', [ 'uses' => 'Api\Mobile\TracksController@popular']);
|
||||
/* Route::get('tracks/id', [ 'uses' => 'Api\Mobile\TracksController@track']);
|
||||
Route::get('user', ['uses' => 'Api\Mobile\UserController@user']);*/
|
||||
});
|
||||
});
|
||||
|
|
|
@ -102,7 +102,7 @@ class Image extends Model
|
|||
{
|
||||
$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()
|
||||
|
@ -114,4 +114,4 @@ class Image extends Model
|
|||
mkdir($destination, 0777, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
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);
|
||||
|
||||
return \Config::get('app.files_directory') . '/tracks/' . $dir;
|
||||
return \Config::get('ponyfm.files_directory') . '/tracks/' . $dir;
|
||||
}
|
||||
|
||||
public function getDates()
|
||||
|
@ -634,4 +634,4 @@ class Track extends Model
|
|||
{
|
||||
return 'track-' . $this->id . '-' . $key;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -94,7 +94,7 @@ class TrackFile extends Model
|
|||
{
|
||||
$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()
|
||||
|
@ -116,4 +116,4 @@ class TrackFile extends Model
|
|||
{
|
||||
return 'track_file-' . $this->id . '-' . $key;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
return [
|
||||
'version' => 1,
|
||||
'urls' => [
|
||||
'api' => '',
|
||||
'auth' => '',
|
||||
'token' => ''
|
||||
],
|
||||
'client_id' => 0,
|
||||
'secret' => ''
|
||||
];
|
||||
return [
|
||||
'version' => 1,
|
||||
'urls' => [
|
||||
'api' => env('PONI_API_URL', 'https://api.poniverse.net/v1/'),
|
||||
'register' => env('PONI_REGISTER_URL', 'https://poniverse.net/register?site=pony.fm'),
|
||||
'auth' => env('PONI_AUTH_URL', 'https://poniverse.net/oauth/authorize'),
|
||||
'token' => env('PONI_TOKEN_URL', 'https://poniverse.net/oauth/access_token')
|
||||
],
|
||||
'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')
|
||||
<script>
|
||||
window.pfm = {
|
||||
token: "{{Session::token()}}",
|
||||
token: "{!! csrf_token() !!}",
|
||||
auth: {
|
||||
@if (Auth::check())
|
||||
isLogged: true,
|
||||
user: {{Auth::user()->toJson()}}
|
||||
user: {!! Auth::user()->toJson() !!}
|
||||
@else
|
||||
isLogged: false
|
||||
@endif
|
||||
|
@ -131,4 +131,4 @@
|
|||
|
||||
@yield('app_scripts')
|
||||
|
||||
@endsection
|
||||
@endsection
|
||||
|
|
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.site.config /etc/nginx/sites-enabled/pony.fm
|
||||
|
||||
|
@ -12,4 +13,4 @@ sudo service php5-fpm restart
|
|||
|
||||
sudo service mysql restart
|
||||
|
||||
# todo: figure out how to restart redis
|
||||
# todo: figure out how to restart redis
|
||||
|
|
|
@ -31,7 +31,7 @@ cd /vagrant
|
|||
/usr/local/bin/composer self-update
|
||||
composer install
|
||||
|
||||
cp -r /vagrant/vagrant/config/* "/vagrant/app/config/local"
|
||||
cp "/vagrant/vagrant/.env.local" "/vagrant/.env"
|
||||
|
||||
php artisan migrate
|
||||
php artisan db:seed
|
||||
|
|
|
@ -1,2 +1,3 @@
|
|||
#!/usr/bin/env bash
|
||||
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