-
Notifications
You must be signed in to change notification settings - Fork 0
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
150 changed files
with
8,373 additions
and
537 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 was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
|
@@ -4,4 +4,4 @@ vendor | |
.env | ||
.vscode | ||
.phpunit.result.cache | ||
*info.php | ||
*info.php |
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,42 +1,37 @@ | ||
FROM php:8.3-fpm | ||
FROM php:8.3-cli | ||
|
||
WORKDIR /var/www/laravel-app | ||
WORKDIR /srv/gamewatch | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
libcurl4-openssl-dev \ | ||
libbrotli-dev \ | ||
libc-ares-dev \ | ||
libssl-dev \ | ||
apt-utils \ | ||
curl \ | ||
wget \ | ||
zip \ | ||
git \ | ||
nano \ | ||
supervisor | ||
npm | ||
|
||
RUN docker-php-ext-configure pcntl --enable-pcntl | ||
RUN docker-php-ext-install pdo pdo_mysql pcntl opcache | ||
|
||
RUN pecl install xdebug \ | ||
redis \ | ||
&& docker-php-ext-enable xdebug \ | ||
redis | ||
|
||
RUN mkdir -p /var/run/php && \ | ||
chown -R www-data:www-data /var/run/php && \ | ||
chmod 755 /var/run/php | ||
RUN printf "\n" | pecl install swoole | ||
|
||
COPY . /var/www/laravel-app | ||
RUN docker-php-ext-enable xdebug \ | ||
redis \ | ||
swoole | ||
|
||
COPY . . | ||
COPY ./docker/php "${PHP_INI_DIR}/conf.d/" | ||
COPY ./docker/php-fpm/www.conf /usr/local/etc/php-fpm.d/www.conf | ||
COPY ./docker/supervisor /etc/supervisor/ | ||
|
||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | ||
|
||
RUN find /var/www/laravel-app -not -path "/var/www/laravel-app/vendor/*" -type f -exec chmod 644 {} \; | ||
RUN find /var/www/laravel-app -type d -exec chmod 755 {} \; | ||
RUN chown -R www-data:www-data /var/www/laravel-app | ||
RUN chgrp -R www-data storage bootstrap/cache | ||
RUN chmod -R ug+rwx storage bootstrap/cache | ||
|
||
COPY ./docker/entrypoint.app.sh /usr/local/bin/entrypoint.sh | ||
RUN chmod +x /usr/local/bin/entrypoint.sh | ||
ENTRYPOINT ["entrypoint.sh"] |
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
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,41 @@ | ||
<?php | ||
|
||
namespace App\Console\Commands; | ||
|
||
use App\Repositories\UserRepository; | ||
use App\Services\AuthService; | ||
use Illuminate\Console\Command; | ||
|
||
class CreateRoot extends Command | ||
{ | ||
/** | ||
* The name and signature of the console command. | ||
* | ||
* @var string | ||
*/ | ||
protected $signature = 'app:create-root'; | ||
|
||
/** | ||
* The console command description. | ||
* | ||
* @var string | ||
*/ | ||
protected $description = 'Creates the Root User for the application'; | ||
|
||
/** | ||
* Execute the console command. | ||
*/ | ||
public function handle() | ||
{ | ||
$created = resolve(UserRepository::class)->createRoot(); | ||
|
||
if ($created && app()->environment(['local', 'testing'])) { | ||
$jwt = resolve(AuthService::class)->generateJWT([ | ||
'email' => config('auth.root.email'), | ||
'password' => config('auth.root.password') | ||
]); | ||
|
||
$this->info('JWT: ' . $jwt['token']); | ||
} | ||
} | ||
} |
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,33 @@ | ||
<?php | ||
|
||
namespace App\Console\Commands; | ||
|
||
use App\Repositories\UserRepository; | ||
use App\Services\Discord\Commands\ReleasesCommand; | ||
use App\Services\Discord\DiscordAppService; | ||
use Illuminate\Console\Command; | ||
|
||
class DispatchNotifications extends Command | ||
{ | ||
/** | ||
* The name and signature of the console command. | ||
* | ||
* @var string | ||
*/ | ||
protected $signature = 'app:dispatch-notifications'; | ||
|
||
/** | ||
* The console command description. | ||
* | ||
* @var string | ||
*/ | ||
protected $description = 'Dispatch notifications for all users'; | ||
|
||
/** | ||
* Execute the console command. | ||
*/ | ||
public function handle() | ||
{ | ||
resolve(DiscordAppService::class)->dispatchNotifications(); | ||
} | ||
} |
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,35 @@ | ||
<?php | ||
|
||
namespace App\Console\Commands; | ||
|
||
use App\Services\Discord\DiscordAppService; | ||
use Illuminate\Console\Command; | ||
|
||
class RegisterCommand extends Command | ||
{ | ||
/** | ||
* The name and signature of the console command. | ||
* | ||
* @var string | ||
*/ | ||
protected $signature = 'app:register-command {name}'; | ||
|
||
/** | ||
* The console command description. | ||
* | ||
* @var string | ||
*/ | ||
protected $description = 'Register Discord Command'; | ||
|
||
/** | ||
* Execute the console command. | ||
*/ | ||
public function handle() | ||
{ | ||
$this->info( | ||
resolve(DiscordAppService::class)->registerCommand( | ||
$this->argument('name') | ||
) | ||
); | ||
} | ||
} |
Oops, something went wrong.