-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #125 from Team-VoW/docker
- Loading branch information
Showing
551 changed files
with
1,413 additions
and
1,205 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
DB_ROOT_PASSWORD=rootpassword | ||
DB_USER=vowuser | ||
DB_PASSWORD=password |
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 |
---|---|---|
@@ -1,73 +1,72 @@ | ||
Options -Indexes | ||
|
||
RewriteEngine On | ||
|
||
# In case of redirection problems, uncommenting the following line might help | ||
# RewriteBase / | ||
|
||
# In case it's necessary to allow direct access to all files besides those with extensions listed bellow, uncomment the next two lines | ||
# RewriteCond %{REQUEST_FILENAME} !-f | ||
# RewriteCond %{REQUEST_FILENAME} !-d | ||
|
||
RewriteCond %{REQUESt_URI} files/updater-data/.* [OR] | ||
RewriteCond %{REQUEST_URI} files/core-dev-server/.* | ||
RewriteRule ^.*$ - [NC,L] | ||
|
||
RewriteCond %{REQUEST_URI} browserconfig\.xml$ [OR] | ||
RewriteCond %{REQUEST_URI} site\.webmanifest$ | ||
RewriteRule ^.*$ - [NC,L] | ||
|
||
RewriteCond %{REQUEST_FILENAME} -s [OR] | ||
RewriteCond %{REQUEST_FILENAME} -l [OR] | ||
RewriteCond %{REQUEST_FILENAME} -d [OR] | ||
RewriteCond %{REQUEST_FILENAME} -f | ||
RewriteRule \.(css|js|txt|ico|ttf|xml|svg|gif|png|ogg|jpg)$ - [NC,L] | ||
|
||
RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\2$ | ||
RewriteRule ^(.*) - [E=BASE:%1] | ||
RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L] | ||
|
||
# Use .phtml files as .php files | ||
AddType application/x-httpd-php .php .phtml | ||
|
||
# Compress HTML, CSS, JavaScript, Text, XML a fonts | ||
<IfModule mod_deflate.c> | ||
AddOutputFilterByType DEFLATE application/javascript | ||
AddOutputFilterByType DEFLATE application/x-font | ||
AddOutputFilterByType DEFLATE application/x-font-opentype | ||
AddOutputFilterByType DEFLATE application/x-font-otf | ||
AddOutputFilterByType DEFLATE application/x-font-truetype | ||
AddOutputFilterByType DEFLATE application/x-font-ttf | ||
AddOutputFilterByType DEFLATE application/x-javascript | ||
AddOutputFilterByType DEFLATE application/xhtml+xml | ||
AddOutputFilterByType DEFLATE application/xml | ||
AddOutputFilterByType DEFLATE font/opentype | ||
AddOutputFilterByType DEFLATE font/otf | ||
AddOutputFilterByType DEFLATE font/ttf | ||
AddOutputFilterByType DEFLATE image/svg+xml | ||
AddOutputFilterByType DEFLATE image/x-icon | ||
AddOutputFilterByType DEFLATE text/css | ||
AddOutputFilterByType DEFLATE text/html | ||
AddOutputFilterByType DEFLATE text/javascript | ||
AddOutputFilterByType DEFLATE text/plain | ||
AddOutputFilterByType DEFLATE text/xml | ||
</IfModule> | ||
|
||
# Cache for one week (HTTP/1.0) | ||
#<IfModule mod_expires.c> | ||
# ExpiresActive On | ||
# ExpiresDefault "access plus 1 seconds" | ||
# ExpiresByType text/css "access plus 604800 seconds" | ||
# ExpiresByType text/javascript "access plus 604800 seconds" | ||
# ExpiresByType image/png "access plus 604800 seconds" | ||
# ExpiresByType image/gif "access plus 604800 seconds" | ||
# ExpiresByType image/x-icon "access plus 604800 seconds" | ||
# ExpiresByType image/svg+xml "access plus 604800 seconds" | ||
#</IfModule> | ||
|
||
# Cache for one week (HTTP/1.1) | ||
#<IfModule mod_headers.c> | ||
# <filesMatch ".(css|js|png|gif|ico|svg)$"> | ||
# Header set Cache-Control "max-age=604800, public" | ||
# </filesMatch> | ||
#</IfModule> | ||
Options -Indexes | ||
|
||
RewriteEngine On | ||
|
||
# In case of redirection problems, uncommenting the following line might help | ||
# RewriteBase / | ||
|
||
# In case it's necessary to allow direct access to all files besides those with extensions listed bellow, uncomment the next two lines | ||
# RewriteCond %{REQUEST_FILENAME} !-f | ||
# RewriteCond %{REQUEST_FILENAME} !-d | ||
|
||
RewriteCond %{REQUESt_URI} files/updater-data/.* | ||
RewriteRule ^.*$ - [NC,L] | ||
|
||
RewriteCond %{REQUEST_URI} browserconfig\.xml$ [OR] | ||
RewriteCond %{REQUEST_URI} site\.webmanifest$ | ||
RewriteRule ^.*$ - [NC,L] | ||
|
||
RewriteCond %{REQUEST_FILENAME} -s [OR] | ||
RewriteCond %{REQUEST_FILENAME} -l [OR] | ||
RewriteCond %{REQUEST_FILENAME} -d [OR] | ||
RewriteCond %{REQUEST_FILENAME} -f | ||
RewriteRule \.(css|js|txt|ico|ttf|xml|svg|gif|png|ogg|jpg)$ - [NC,L] | ||
|
||
RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\2$ | ||
RewriteRule ^(.*) - [E=BASE:%1] | ||
RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L] | ||
|
||
# Use .phtml files as .php files | ||
AddType application/x-httpd-php .php .phtml | ||
|
||
# Compress HTML, CSS, JavaScript, Text, XML a fonts | ||
<IfModule mod_deflate.c> | ||
AddOutputFilterByType DEFLATE application/javascript | ||
AddOutputFilterByType DEFLATE application/x-font | ||
AddOutputFilterByType DEFLATE application/x-font-opentype | ||
AddOutputFilterByType DEFLATE application/x-font-otf | ||
AddOutputFilterByType DEFLATE application/x-font-truetype | ||
AddOutputFilterByType DEFLATE application/x-font-ttf | ||
AddOutputFilterByType DEFLATE application/x-javascript | ||
AddOutputFilterByType DEFLATE application/xhtml+xml | ||
AddOutputFilterByType DEFLATE application/xml | ||
AddOutputFilterByType DEFLATE font/opentype | ||
AddOutputFilterByType DEFLATE font/otf | ||
AddOutputFilterByType DEFLATE font/ttf | ||
AddOutputFilterByType DEFLATE image/svg+xml | ||
AddOutputFilterByType DEFLATE image/x-icon | ||
AddOutputFilterByType DEFLATE text/css | ||
AddOutputFilterByType DEFLATE text/html | ||
AddOutputFilterByType DEFLATE text/javascript | ||
AddOutputFilterByType DEFLATE text/plain | ||
AddOutputFilterByType DEFLATE text/xml | ||
</IfModule> | ||
|
||
# Cache for one week (HTTP/1.0) | ||
#<IfModule mod_expires.c> | ||
# ExpiresActive On | ||
# ExpiresDefault "access plus 1 seconds" | ||
# ExpiresByType text/css "access plus 604800 seconds" | ||
# ExpiresByType text/javascript "access plus 604800 seconds" | ||
# ExpiresByType image/png "access plus 604800 seconds" | ||
# ExpiresByType image/gif "access plus 604800 seconds" | ||
# ExpiresByType image/x-icon "access plus 604800 seconds" | ||
# ExpiresByType image/svg+xml "access plus 604800 seconds" | ||
#</IfModule> | ||
|
||
# Cache for one week (HTTP/1.1) | ||
#<IfModule mod_headers.c> | ||
# <filesMatch ".(css|js|png|gif|ico|svg)$"> | ||
# Header set Cache-Control "max-age=604800, public" | ||
# </filesMatch> | ||
#</IfModule> |
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,53 +1,53 @@ | ||
<?php | ||
|
||
namespace VoicesOfWynn\Controllers\Api; | ||
|
||
use VoicesOfWynn\Controllers\Controller; | ||
|
||
/** | ||
* Base class for all API controllers | ||
*/ | ||
abstract class ApiController extends Controller | ||
{ | ||
|
||
/* All API keys go here */ | ||
//Line reporting keys | ||
const COLLECTING_API_KEY = 'testing'; | ||
const UPDATING_API_KEY = 'testing'; | ||
//Usage analysis api keys | ||
const AGGREGATE_API_KEY = 'testing'; | ||
//Discord integration key | ||
const DISCORD_INTEGRATION_API_KEY = 'testing'; | ||
//Premium authenticator key | ||
const PREMIUM_AUTHENTICATOR_API_KEY = 'testing'; | ||
|
||
/** | ||
* Controller constructor enabling output buffering and setting the Content-Type header | ||
* Since specific controllers don't have a constructor, this will be invoked every time a new constructor is | ||
* instantiated | ||
*/ | ||
public function __construct() | ||
{ | ||
header('Content-Type: application/json'); | ||
|
||
//Start output buffering and keep it enabled for the whole duration of processing the request. | ||
//Output is harvested and returned in the getOutput() method | ||
ob_start(); | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public abstract function process(array $args): int; | ||
|
||
/** | ||
* Method returning the final response of this API request | ||
* This is called from the RouterController | ||
* @return string Final response to send to the client | ||
*/ | ||
public function getOutput() { | ||
$result = ob_get_contents(); | ||
ob_end_clean(); | ||
return $result; | ||
} | ||
<?php | ||
|
||
namespace VoicesOfWynn\Controllers\Api; | ||
|
||
use VoicesOfWynn\Controllers\Controller; | ||
|
||
/** | ||
* Base class for all API controllers | ||
*/ | ||
abstract class ApiController extends Controller | ||
{ | ||
|
||
/* All API keys go here */ | ||
//Line reporting keys | ||
const COLLECTING_API_KEY = 'testing'; | ||
const UPDATING_API_KEY = 'testing'; | ||
//Usage analysis api keys | ||
const AGGREGATE_API_KEY = 'testing'; | ||
//Discord integration key | ||
const DISCORD_INTEGRATION_API_KEY = 'testing'; | ||
//Premium authenticator key | ||
const PREMIUM_AUTHENTICATOR_API_KEY = 'testing'; | ||
|
||
/** | ||
* Controller constructor enabling output buffering and setting the Content-Type header | ||
* Since specific controllers don't have a constructor, this will be invoked every time a new constructor is | ||
* instantiated | ||
*/ | ||
public function __construct() | ||
{ | ||
header('Content-Type: application/json'); | ||
|
||
//Start output buffering and keep it enabled for the whole duration of processing the request. | ||
//Output is harvested and returned in the getOutput() method | ||
ob_start(); | ||
} | ||
|
||
/** | ||
* @inheritDoc | ||
*/ | ||
public abstract function process(array $args): int; | ||
|
||
/** | ||
* Method returning the final response of this API request | ||
* This is called from the RouterController | ||
* @return string Final response to send to the client | ||
*/ | ||
public function getOutput() { | ||
$result = ob_get_contents(); | ||
ob_end_clean(); | ||
return $result; | ||
} | ||
} |
Oops, something went wrong.