From 8e8e358fbbaea753c0f607b5198150914dc9b1c2 Mon Sep 17 00:00:00 2001 From: Michael Hose Date: Wed, 7 Apr 2021 16:40:21 +0400 Subject: [PATCH 01/12] wip --- .docker/common/crontab | 1 + .docker/common/wait-for-it.sh | 57 -- .docker/develop/php/Dockerfile | 12 +- .gitignore | 2 + app/Console/Kernel.php | 5 +- .../Controllers/Api/ArticleController.php | 32 +- app/Http/Resources/ArticleResource.php | 4 +- composer.json | 4 +- composer.lock | 630 ++++++++++++++++-- docker-compose.yml | 46 +- resources/lang/ru/devhub.php | 1 + resources/sass/tailwind.css | 2 +- resources/views/include/footer.blade.php | 21 +- resources/views/pages/contact.blade.php | 44 ++ .../views/pages/profile/show/info.blade.php | 2 +- routes/web.php | 11 +- 16 files changed, 707 insertions(+), 167 deletions(-) create mode 100644 .docker/common/crontab delete mode 100644 .docker/common/wait-for-it.sh create mode 100644 resources/views/pages/contact.blade.php diff --git a/.docker/common/crontab b/.docker/common/crontab new file mode 100644 index 00000000..2f3a1298 --- /dev/null +++ b/.docker/common/crontab @@ -0,0 +1 @@ +* * * * * cd /var/www && php artisan schedule:run >> /dev/null 2>&1 diff --git a/.docker/common/wait-for-it.sh b/.docker/common/wait-for-it.sh deleted file mode 100644 index daca5469..00000000 --- a/.docker/common/wait-for-it.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh - -log() { - echo "[wait-for] [`date +'%Y%m%d%H%M%S'`] $@" -} - -usage() { - echo "Usage: `basename "$0"` [--timeout=15] : [:]" -} - -unknown_arg() { - log "[ERROR] unknown argument: '$@'" - usage - exit 2 -} - -wait_for() { - timeout=$1 && host=$2 && port=$3 - log "wait '$host':'$port' up to '$timeout'" - for i in `seq $timeout` ; do - if nc -z "$host" "$port" > /dev/null 2>&1 ; then - log "wait finish '$host:$port' [`expr $(date +%s) - $START`] seconds" - exit 0 - fi - log "wait attempt '${host}:${port}' [$i]" - sleep 1 - done - log "[ERROR] wait timeout of '$timeout' on '$host:$port'" - exit 1 -} - -trap 'kill $(jobs -p) &>/dev/null' EXIT - -START=$(date +%s) -timeout=15 -pids="" -for i in $@ ; do - case $i in - --timeout=*) timeout="${i#*=}" ;; - -t=*) timeout="${i#*=}" ;; - *:* ) - wait_for "$timeout" "${i%%:*}" "${i##*:}" & - pids="$pids $!" - ;; - *) unknown_arg "$i" ;; - esac -done - -status=0 -for pid in $pids; do - if ! wait $pid ; then - status=1 - fi -done - -log "wait done with status=$status" -exit $status diff --git a/.docker/develop/php/Dockerfile b/.docker/develop/php/Dockerfile index 1f914303..ba6099df 100644 --- a/.docker/develop/php/Dockerfile +++ b/.docker/develop/php/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8-fpm-alpine +FROM php:8-cli-alpine RUN apk update && apk add --no-cache \ zip \ @@ -30,6 +30,8 @@ RUN mv $PHP_INI_DIR/php.ini-development $PHP_INI_DIR/php.ini #COPY ./.docker/develop/php/local.ini $PHP_INI_DIR/conf.d #COPY ./.docker/develop/php/xlaravel.pool.conf /usr/local/etc/php-fpm.d/ +RUN docker-php-ext-install sockets + WORKDIR /var/www ARG PUID=1000 @@ -39,3 +41,11 @@ ENV PGID ${PGID} RUN groupmod -o -g ${PGID} www-data && \ usermod -o -u ${PUID} -g www-data www-data + +EXPOSE 8000 + +CMD ["php", "artisan", "octane:start"] + +#TODO: add cron +#COPY ./.docker/common/crontab /etc/crontabs/root +#CMD crond -f diff --git a/.gitignore b/.gitignore index 27caca78..8cc66945 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,5 @@ yarn-error.log .idea .php_cs .php_cs.cache +rr +.rr.yaml diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index d2eac0bb..ed54230d 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -4,6 +4,7 @@ use Illuminate\Console\Scheduling\Schedule; use Illuminate\Foundation\Console\Kernel as ConsoleKernel; +use Illuminate\Support\Facades\DB; class Kernel extends ConsoleKernel { @@ -25,7 +26,9 @@ class Kernel extends ConsoleKernel */ protected function schedule(Schedule $schedule) { - $schedule->command('cache:clear')->everyMinute(); + $schedule->call(function () { + DB::table('users')->update(['karma' => 0]); + })->lastDayOfMonth('00:01'); } /** diff --git a/app/Http/Controllers/Api/ArticleController.php b/app/Http/Controllers/Api/ArticleController.php index 5030a7df..d23ac828 100644 --- a/app/Http/Controllers/Api/ArticleController.php +++ b/app/Http/Controllers/Api/ArticleController.php @@ -64,26 +64,38 @@ public function store(ArticleRequest $request): JsonResponse public function vote(VoteRequest $request): JsonResponse { $article = Article::findOrFail($request->id); - ($request->type === 'up') ? self::upOrDownVote($request->user(), $article) : self::upOrDownVote($request->user(), $article, 'down'); + ($request->type === 'up') + ? self::upOrDownVote($request->user(), $article) + : self::upOrDownVote( + $request->user(), + $article, + 'down' + ); return response()->json(['result' => 'true']); } public static function upOrDownVote(User $user, $target, string $type = 'up'): bool { - $hasVoted = $user->{'has'.ucfirst($type).'Voted'}($target); + $hasVoted = $user->{'has' . ucfirst($type) . 'Voted'}($target); DB::beginTransaction(); try { - $user->{$type.'Vote'}($target); + $user->{$type . 'Vote'}($target); if ($hasVoted) { $user->cancelVote($target); foreach ($target->hubs as $hub) { $type === 'up' ? $hub->rating-- : $hub->rating++; $hub->save(); } - $type === 'up' ? $target->creator->rating-- : $target->creator->rating++; - $target->author->save(); + if ($type === 'up') { + $target->creator->rating--; + $target->creator->karma--; + } else { + $target->creator->rating++; + $target->creator->karma++; + } + $target->creator->save(); DB::commit(); return false; @@ -92,8 +104,14 @@ public static function upOrDownVote(User $user, $target, string $type = 'up'): b $type === 'up' ? $hub->rating++ : $hub->rating--; $hub->save(); } - $type === 'up' ? $target->creator->rating++ : $target->creator->rating--; - $target->author->save(); + if ($type === 'up') { + $target->creator->rating++; + $target->creator->karma++; + } else { + $target->creator->rating--; + $target->creator->karma--; + } + $target->creator->save(); DB::commit(); } catch (Exception $e) { DB::rollback(); diff --git a/app/Http/Resources/ArticleResource.php b/app/Http/Resources/ArticleResource.php index 8eddb091..474b785a 100644 --- a/app/Http/Resources/ArticleResource.php +++ b/app/Http/Resources/ArticleResource.php @@ -25,8 +25,8 @@ public function toArray($request) 'slug' => $this->slug, 'body' => $this->body, //\Str::words($this->body, 87, ''), 'votes' => $this->voters()->count(), - 'upvotes' => $this->up, - 'downvotes' => $this->down, + 'upvotes' => $this->up ?? $this->upVoters()->count(), + 'downvotes' => $this->down ?? $this->downVoters()->count(), 'views' => $this->views_count, 'created_at' => $this->created_at, 'is_up_voted' => auth()->guard('api')->id() ? auth()->guard('api')->user()->hasUpVoted($this->setAppends([])) : false, diff --git a/composer.json b/composer.json index 4fbf303b..8d602b34 100644 --- a/composer.json +++ b/composer.json @@ -17,6 +17,7 @@ "jackiedo/dotenv-editor": "^1.2", "jcc/laravel-vote": "dev-master", "laravel/framework": "^8.12", + "laravel/octane": "^0.1.0", "laravel/passport": "^10.1", "laravel/socialite": "^5.1", "laravel/tinker": "^2.5", @@ -29,7 +30,8 @@ "predis/predis": "^1.1", "rennokki/laravel-eloquent-query-cache": "^2.6", "sentry/sentry-laravel": "^2.3", - "spatie/laravel-medialibrary": "^9.0.0" + "spatie/laravel-medialibrary": "^9.0.0", + "spiral/roadrunner": "^2.0" }, "require-dev": { "barryvdh/laravel-debugbar": "^3.5", diff --git a/composer.lock b/composer.lock index d48a4814..fe16567c 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "627811b4531a13873eb68a5665107637", + "content-hash": "54a3bfe394c14133a6444a36f0d19497", "packages": [ { "name": "asm89/stack-cors", @@ -2596,18 +2596,180 @@ }, "time": "2020-05-27T16:41:55+00:00" }, + { + "name": "laminas/laminas-diactoros", + "version": "2.5.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-diactoros.git", + "reference": "4ff7400c1c12e404144992ef43c8b733fd9ad516" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-diactoros/zipball/4ff7400c1c12e404144992ef43c8b733fd9ad516", + "reference": "4ff7400c1c12e404144992ef43c8b733fd9ad516", + "shasum": "" + }, + "require": { + "laminas/laminas-zendframework-bridge": "^1.0", + "php": "^7.3 || ~8.0.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0" + }, + "conflict": { + "phpspec/prophecy": "<1.9.0" + }, + "provide": { + "psr/http-factory-implementation": "1.0", + "psr/http-message-implementation": "1.0" + }, + "replace": { + "zendframework/zend-diactoros": "^2.2.1" + }, + "require-dev": { + "ext-curl": "*", + "ext-dom": "*", + "ext-gd": "*", + "ext-libxml": "*", + "http-interop/http-factory-tests": "^0.8.0", + "laminas/laminas-coding-standard": "~1.0.0", + "php-http/psr7-integration-tests": "^1.1", + "phpspec/prophecy-phpunit": "^2.0", + "phpunit/phpunit": "^9.1" + }, + "type": "library", + "extra": { + "laminas": { + "config-provider": "Laminas\\Diactoros\\ConfigProvider", + "module": "Laminas\\Diactoros" + } + }, + "autoload": { + "files": [ + "src/functions/create_uploaded_file.php", + "src/functions/marshal_headers_from_sapi.php", + "src/functions/marshal_method_from_sapi.php", + "src/functions/marshal_protocol_version_from_sapi.php", + "src/functions/marshal_uri_from_sapi.php", + "src/functions/normalize_server.php", + "src/functions/normalize_uploaded_files.php", + "src/functions/parse_cookie_header.php", + "src/functions/create_uploaded_file.legacy.php", + "src/functions/marshal_headers_from_sapi.legacy.php", + "src/functions/marshal_method_from_sapi.legacy.php", + "src/functions/marshal_protocol_version_from_sapi.legacy.php", + "src/functions/marshal_uri_from_sapi.legacy.php", + "src/functions/normalize_server.legacy.php", + "src/functions/normalize_uploaded_files.legacy.php", + "src/functions/parse_cookie_header.legacy.php" + ], + "psr-4": { + "Laminas\\Diactoros\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "PSR HTTP Message implementations", + "homepage": "https://laminas.dev", + "keywords": [ + "http", + "laminas", + "psr", + "psr-17", + "psr-7" + ], + "support": { + "chat": "https://laminas.dev/chat", + "docs": "https://docs.laminas.dev/laminas-diactoros/", + "forum": "https://discourse.laminas.dev", + "issues": "https://github.com/laminas/laminas-diactoros/issues", + "rss": "https://github.com/laminas/laminas-diactoros/releases.atom", + "source": "https://github.com/laminas/laminas-diactoros" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2020-11-18T18:39:28+00:00" + }, + { + "name": "laminas/laminas-zendframework-bridge", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/laminas/laminas-zendframework-bridge.git", + "reference": "6cccbddfcfc742eb02158d6137ca5687d92cee32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laminas/laminas-zendframework-bridge/zipball/6cccbddfcfc742eb02158d6137ca5687d92cee32", + "reference": "6cccbddfcfc742eb02158d6137ca5687d92cee32", + "shasum": "" + }, + "require": { + "php": "^7.3 || ^8.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.1 || ^9.3", + "psalm/plugin-phpunit": "^0.15.1", + "squizlabs/php_codesniffer": "^3.5", + "vimeo/psalm": "^4.6" + }, + "type": "library", + "extra": { + "laminas": { + "module": "Laminas\\ZendFrameworkBridge" + } + }, + "autoload": { + "files": [ + "src/autoload.php" + ], + "psr-4": { + "Laminas\\ZendFrameworkBridge\\": "src//" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Alias legacy ZF class names to Laminas Project equivalents.", + "keywords": [ + "ZendFramework", + "autoloading", + "laminas", + "zf" + ], + "support": { + "forum": "https://discourse.laminas.dev/", + "issues": "https://github.com/laminas/laminas-zendframework-bridge/issues", + "rss": "https://github.com/laminas/laminas-zendframework-bridge/releases.atom", + "source": "https://github.com/laminas/laminas-zendframework-bridge" + }, + "funding": [ + { + "url": "https://funding.communitybridge.org/projects/laminas-project", + "type": "community_bridge" + } + ], + "time": "2021-02-25T21:54:58+00:00" + }, { "name": "laravel/framework", - "version": "v8.35.1", + "version": "v8.36.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "d118c0df39e7524131176aaf76493eae63a8a602" + "reference": "c07477098c3685fcf812920d2fa8fa3a77e1e0bf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/d118c0df39e7524131176aaf76493eae63a8a602", - "reference": "d118c0df39e7524131176aaf76493eae63a8a602", + "url": "https://api.github.com/repos/laravel/framework/zipball/c07477098c3685fcf812920d2fa8fa3a77e1e0bf", + "reference": "c07477098c3685fcf812920d2fa8fa3a77e1e0bf", "shasum": "" }, "require": { @@ -2762,20 +2924,92 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2021-03-30T21:34:17+00:00" + "time": "2021-04-06T13:58:47+00:00" + }, + { + "name": "laravel/octane", + "version": "v0.1.0", + "source": { + "type": "git", + "url": "https://github.com/laravel/octane.git", + "reference": "fad4952eddb01ee3916bde8ae9b91334f3316f0b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/octane/zipball/fad4952eddb01ee3916bde8ae9b91334f3316f0b", + "reference": "fad4952eddb01ee3916bde8ae9b91334f3316f0b", + "shasum": "" + }, + "require": { + "laminas/laminas-diactoros": "^2.5", + "laravel/framework": "^8.35", + "php": "^8.0", + "symfony/psr-http-message-bridge": "^2.0" + }, + "require-dev": { + "guzzlehttp/guzzle": "^7.2", + "mockery/mockery": "^1.4", + "nunomaduro/collision": "^5.3", + "orchestra/testbench": "^6.16", + "phpunit/phpunit": "^9.3", + "spatie/laravel-ray": "^1.14", + "spiral/roadrunner": "^2.0" + }, + "bin": [ + "bin/roadrunner-worker", + "bin/swoole-server" + ], + "type": "library", + "extra": { + "laravel": { + "providers": [ + "Laravel\\Octane\\OctaneServiceProvider" + ], + "aliases": { + "Octane": "Laravel\\Octane\\OctaneFacade" + } + } + }, + "autoload": { + "psr-4": { + "Laravel\\Octane\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "Supercharge your Laravel application's performance.", + "keywords": [ + "laravel", + "octane", + "roadrunner", + "swoole" + ], + "support": { + "issues": "https://github.com/laravel/octane/issues", + "source": "https://github.com/laravel/octane" + }, + "time": "2021-04-06T14:44:20+00:00" }, { "name": "laravel/passport", - "version": "v10.1.2", + "version": "v10.1.3", "source": { "type": "git", "url": "https://github.com/laravel/passport.git", - "reference": "9f1a5d56eb609250104afc38cf407f7c2520cda3" + "reference": "a5e4471dd99b7638ab5ca3ecab6cd87cf37eb410" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/passport/zipball/9f1a5d56eb609250104afc38cf407f7c2520cda3", - "reference": "9f1a5d56eb609250104afc38cf407f7c2520cda3", + "url": "https://api.github.com/repos/laravel/passport/zipball/a5e4471dd99b7638ab5ca3ecab6cd87cf37eb410", + "reference": "a5e4471dd99b7638ab5ca3ecab6cd87cf37eb410", "shasum": "" }, "require": { @@ -2839,20 +3073,20 @@ "issues": "https://github.com/laravel/passport/issues", "source": "https://github.com/laravel/passport" }, - "time": "2021-03-02T16:40:00+00:00" + "time": "2021-04-06T14:30:45+00:00" }, { "name": "laravel/socialite", - "version": "v5.2.2", + "version": "v5.2.3", "source": { "type": "git", "url": "https://github.com/laravel/socialite.git", - "reference": "8d25d574b4f2005411c0b9cb527ef5e745c1b07d" + "reference": "1960802068f81e44b2ae9793932181cf1cb91b5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/socialite/zipball/8d25d574b4f2005411c0b9cb527ef5e745c1b07d", - "reference": "8d25d574b4f2005411c0b9cb527ef5e745c1b07d", + "url": "https://api.github.com/repos/laravel/socialite/zipball/1960802068f81e44b2ae9793932181cf1cb91b5c", + "reference": "1960802068f81e44b2ae9793932181cf1cb91b5c", "shasum": "" }, "require": { @@ -2908,7 +3142,7 @@ "issues": "https://github.com/laravel/socialite/issues", "source": "https://github.com/laravel/socialite" }, - "time": "2021-03-02T16:50:47+00:00" + "time": "2021-04-06T14:38:16+00:00" }, { "name": "laravel/tinker", @@ -5246,16 +5480,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.6", + "version": "3.0.7", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "906a5fafabe5e6ba51ef3dc65b2722a677908837" + "reference": "d369510df0ebd5e1a5d0fe3d4d23c55fa87a403d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/906a5fafabe5e6ba51ef3dc65b2722a677908837", - "reference": "906a5fafabe5e6ba51ef3dc65b2722a677908837", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/d369510df0ebd5e1a5d0fe3d4d23c55fa87a403d", + "reference": "d369510df0ebd5e1a5d0fe3d4d23c55fa87a403d", "shasum": "" }, "require": { @@ -5337,7 +5571,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.6" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.7" }, "funding": [ { @@ -5353,7 +5587,7 @@ "type": "tidelift" } ], - "time": "2021-03-10T13:58:31+00:00" + "time": "2021-04-06T14:00:11+00:00" }, { "name": "predis/predis", @@ -6352,16 +6586,16 @@ }, { "name": "sentry/sentry", - "version": "3.2.0", + "version": "3.2.1", "source": { "type": "git", "url": "https://github.com/getsentry/sentry-php.git", - "reference": "899b0de58c1e01feb54829b3094af74252aff385" + "reference": "fb4f83e6e2d718d1e5fbfe3a20cced83f47f040f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/899b0de58c1e01feb54829b3094af74252aff385", - "reference": "899b0de58c1e01feb54829b3094af74252aff385", + "url": "https://api.github.com/repos/getsentry/sentry-php/zipball/fb4f83e6e2d718d1e5fbfe3a20cced83f47f040f", + "reference": "fb4f83e6e2d718d1e5fbfe3a20cced83f47f040f", "shasum": "" }, "require": { @@ -6440,7 +6674,7 @@ ], "support": { "issues": "https://github.com/getsentry/sentry-php/issues", - "source": "https://github.com/getsentry/sentry-php/tree/3.2.0" + "source": "https://github.com/getsentry/sentry-php/tree/3.2.1" }, "funding": [ { @@ -6452,7 +6686,7 @@ "type": "custom" } ], - "time": "2021-03-03T11:54:34+00:00" + "time": "2021-04-06T07:55:41+00:00" }, { "name": "sentry/sentry-laravel", @@ -6820,6 +7054,284 @@ }, "time": "2020-11-09T15:54:21+00:00" }, + { + "name": "spiral/goridge", + "version": "v3.0.1", + "source": { + "type": "git", + "url": "https://github.com/spiral/goridge-php.git", + "reference": "3258892afd1d0a9cb889eb21ddd353dd06ba774d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spiral/goridge-php/zipball/3258892afd1d0a9cb889eb21ddd353dd06ba774d", + "reference": "3258892afd1d0a9cb889eb21ddd353dd06ba774d", + "shasum": "" + }, + "require": { + "ext-json": "*", + "ext-sockets": "*", + "php": ">=7.4" + }, + "require-dev": { + "phpstan/phpstan": "~0.12.34", + "phpunit/phpunit": "~8.0", + "rybakit/msgpack": "^0.7.1", + "spiral/code-style": "^1.0" + }, + "type": "goridge", + "autoload": { + "psr-4": { + "Spiral\\Goridge\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anton Titov / Wolfy-J", + "email": "wolfy.jd@gmail.com" + } + ], + "description": "High-performance PHP-to-Golang RPC bridge", + "support": { + "issues": "https://github.com/spiral/goridge-php/issues", + "source": "https://github.com/spiral/goridge-php/tree/v3.0.1" + }, + "time": "2021-03-11T14:28:29+00:00" + }, + { + "name": "spiral/roadrunner", + "version": "v2.0.4", + "source": { + "type": "git", + "url": "https://github.com/spiral/roadrunner.git", + "reference": "5d6ccf85ce65944c5876abc97c3e1d2acf470828" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spiral/roadrunner/zipball/5d6ccf85ce65944c5876abc97c3e1d2acf470828", + "reference": "5d6ccf85ce65944c5876abc97c3e1d2acf470828", + "shasum": "" + }, + "require": { + "spiral/roadrunner-cli": "^2.0", + "spiral/roadrunner-http": "^2.0", + "spiral/roadrunner-worker": "^2.0" + }, + "type": "metapackage", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anton Titov / Wolfy-J", + "email": "wolfy.jd@gmail.com" + }, + { + "name": "RoadRunner Community", + "homepage": "https://github.com/spiral/roadrunner/graphs/contributors" + } + ], + "description": "RoadRunner: High-performance PHP application server, load-balancer and process manager written in Golang", + "support": { + "issues": "https://github.com/spiral/roadrunner/issues", + "source": "https://github.com/spiral/roadrunner/tree/v2.0.4" + }, + "time": "2021-04-06T13:07:33+00:00" + }, + { + "name": "spiral/roadrunner-cli", + "version": "v2.0.2", + "source": { + "type": "git", + "url": "https://github.com/spiral/roadrunner-cli.git", + "reference": "612627f9f188bc5511a18123db592ff83fefd04d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spiral/roadrunner-cli/zipball/612627f9f188bc5511a18123db592ff83fefd04d", + "reference": "612627f9f188bc5511a18123db592ff83fefd04d", + "shasum": "" + }, + "require": { + "composer/semver": "^3.2", + "ext-json": "*", + "php": ">=7.4", + "spiral/roadrunner-worker": ">=2.0", + "symfony/console": "^5.1", + "symfony/http-client": "^5.1", + "symfony/polyfill-php80": "^1.22" + }, + "require-dev": { + "jetbrains/phpstorm-attributes": "^1.0", + "symfony/var-dumper": "^5.1", + "vimeo/psalm": "^4.4" + }, + "bin": [ + "bin/rr" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Spiral\\RoadRunner\\Console\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anton Titov (wolfy-j)", + "email": "wolfy-j@spiralscout.com" + }, + { + "name": "RoadRunner Community", + "homepage": "https://github.com/spiral/roadrunner/graphs/contributors" + } + ], + "description": "RoadRunner: Command Line Interface", + "support": { + "issues": "https://github.com/spiral/roadrunner-cli/issues", + "source": "https://github.com/spiral/roadrunner-cli/tree/v2.0.2" + }, + "time": "2021-03-10T05:56:52+00:00" + }, + { + "name": "spiral/roadrunner-http", + "version": "v2.0.0", + "source": { + "type": "git", + "url": "https://github.com/spiral/roadrunner-http.git", + "reference": "0eb0bc93f16ff8130fd0aaf31f6d87000bf2a605" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spiral/roadrunner-http/zipball/0eb0bc93f16ff8130fd0aaf31f6d87000bf2a605", + "reference": "0eb0bc93f16ff8130fd0aaf31f6d87000bf2a605", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": ">=7.4", + "psr/http-factory": "^1.0.1", + "psr/http-message": "^1.0.1", + "spiral/roadrunner-worker": "^2.0" + }, + "require-dev": { + "jetbrains/phpstorm-attributes": "^1.0", + "nyholm/psr7": "^1.3", + "phpstan/phpstan": "~0.12", + "phpunit/phpunit": "~8.0", + "symfony/var-dumper": "^5.1", + "vimeo/psalm": "^4.4" + }, + "suggest": { + "spiral/roadrunner-cli": "Provides RoadRunner installation and management CLI tools" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Spiral\\RoadRunner\\Http\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anton Titov / Wolfy-J", + "email": "wolfy.jd@gmail.com" + }, + { + "name": "RoadRunner Community", + "homepage": "https://github.com/spiral/roadrunner/graphs/contributors" + } + ], + "description": "RoadRunner: HTTP and PSR-7 worker", + "support": { + "issues": "https://github.com/spiral/roadrunner-http/issues", + "source": "https://github.com/spiral/roadrunner-http/tree/v2.0.0" + }, + "time": "2021-02-18T11:09:37+00:00" + }, + { + "name": "spiral/roadrunner-worker", + "version": "v2.0.3", + "source": { + "type": "git", + "url": "https://github.com/spiral/roadrunner-worker.git", + "reference": "1a10a7641ff045fff2570b5ec1a265713e5a1bd5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/spiral/roadrunner-worker/zipball/1a10a7641ff045fff2570b5ec1a265713e5a1bd5", + "reference": "1a10a7641ff045fff2570b5ec1a265713e5a1bd5", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2.0", + "ext-json": "*", + "ext-sockets": "*", + "php": ">=7.4", + "psr/log": "^1.0", + "spiral/goridge": "^3.0" + }, + "require-dev": { + "jetbrains/phpstorm-attributes": "^1.0", + "symfony/var-dumper": "^5.1", + "vimeo/psalm": "^4.4" + }, + "suggest": { + "spiral/roadrunner-cli": "Provides RoadRunner installation and management CLI tools" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Spiral\\RoadRunner\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Anton Titov (wolfy-j)", + "email": "wolfy-j@spiralscout.com" + }, + { + "name": "RoadRunner Community", + "homepage": "https://github.com/spiral/roadrunner/graphs/contributors" + } + ], + "description": "RoadRunner: PHP worker", + "support": { + "issues": "https://github.com/spiral/roadrunner-worker/issues", + "source": "https://github.com/spiral/roadrunner-worker/tree/v2.0.3" + }, + "time": "2021-02-19T13:15:37+00:00" + }, { "name": "swiftmailer/swiftmailer", "version": "v6.2.7", @@ -9886,16 +10398,16 @@ }, { "name": "barryvdh/laravel-debugbar", - "version": "v3.5.2", + "version": "v3.5.4", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-debugbar.git", - "reference": "cae0a8d1cb89b0f0522f65e60465e16d738e069b" + "reference": "b8af309dea71eab3f2c942652969f518130228ee" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/cae0a8d1cb89b0f0522f65e60465e16d738e069b", - "reference": "cae0a8d1cb89b0f0522f65e60465e16d738e069b", + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/b8af309dea71eab3f2c942652969f518130228ee", + "reference": "b8af309dea71eab3f2c942652969f518130228ee", "shasum": "" }, "require": { @@ -9955,7 +10467,7 @@ ], "support": { "issues": "https://github.com/barryvdh/laravel-debugbar/issues", - "source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.5.2" + "source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.5.4" }, "funding": [ { @@ -9963,7 +10475,7 @@ "type": "github" } ], - "time": "2021-01-06T14:21:44+00:00" + "time": "2021-04-06T18:11:42+00:00" }, { "name": "doctrine/instantiator", @@ -11003,22 +11515,22 @@ }, { "name": "orchestra/testbench", - "version": "v6.16.0", + "version": "v6.17.0", "source": { "type": "git", "url": "https://github.com/orchestral/testbench.git", - "reference": "5bd3a622eeb6f5361b90089791d7b2f35f034b91" + "reference": "1782d7d54312ebbf3bf79d66e4ac46e7dee78e0f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench/zipball/5bd3a622eeb6f5361b90089791d7b2f35f034b91", - "reference": "5bd3a622eeb6f5361b90089791d7b2f35f034b91", + "url": "https://api.github.com/repos/orchestral/testbench/zipball/1782d7d54312ebbf3bf79d66e4ac46e7dee78e0f", + "reference": "1782d7d54312ebbf3bf79d66e4ac46e7dee78e0f", "shasum": "" }, "require": { "laravel/framework": "^8.25", "mockery/mockery": "^1.4.2", - "orchestra/testbench-core": "^6.20", + "orchestra/testbench-core": "^6.21", "php": "^7.3 || ^8.0", "phpunit/phpunit": "^8.4 || ^9.3.3", "spatie/laravel-ray": "^1.17.1" @@ -11052,7 +11564,7 @@ ], "support": { "issues": "https://github.com/orchestral/testbench/issues", - "source": "https://github.com/orchestral/testbench/tree/v6.16.0" + "source": "https://github.com/orchestral/testbench/tree/v6.17.0" }, "funding": [ { @@ -11064,20 +11576,20 @@ "type": "liberapay" } ], - "time": "2021-03-30T23:05:25+00:00" + "time": "2021-04-06T12:07:42+00:00" }, { "name": "orchestra/testbench-core", - "version": "v6.20.0", + "version": "v6.21.0", "source": { "type": "git", "url": "https://github.com/orchestral/testbench-core.git", - "reference": "5789b74816e3c3f3d4bd2c419fb08ee2dd66b177" + "reference": "8412a8557b822fabd657d6ab5b06ca20c65b1b3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/5789b74816e3c3f3d4bd2c419fb08ee2dd66b177", - "reference": "5789b74816e3c3f3d4bd2c419fb08ee2dd66b177", + "url": "https://api.github.com/repos/orchestral/testbench-core/zipball/8412a8557b822fabd657d6ab5b06ca20c65b1b3e", + "reference": "8412a8557b822fabd657d6ab5b06ca20c65b1b3e", "shasum": "" }, "require": { @@ -11092,6 +11604,7 @@ "mockery/mockery": "^1.4.2", "orchestra/canvas": "^6.1", "phpunit/phpunit": "^8.4 || ^9.3.3 || ^10.0", + "spatie/laravel-ray": "^1.7.1", "symfony/process": "^5.0" }, "suggest": { @@ -11150,7 +11663,7 @@ "type": "liberapay" } ], - "time": "2021-03-30T22:52:56+00:00" + "time": "2021-04-06T11:36:25+00:00" }, { "name": "phar-io/manifest", @@ -11938,12 +12451,12 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "0a55b3eacf6b4a0fdc6ec9d01e00285ca9942b2b" + "reference": "f3d64e623a75abaababa97e02a31e3771dea481a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/0a55b3eacf6b4a0fdc6ec9d01e00285ca9942b2b", - "reference": "0a55b3eacf6b4a0fdc6ec9d01e00285ca9942b2b", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/f3d64e623a75abaababa97e02a31e3771dea481a", + "reference": "f3d64e623a75abaababa97e02a31e3771dea481a", "shasum": "" }, "conflict": { @@ -11987,7 +12500,7 @@ "doctrine/doctrine-module": "<=0.7.1", "doctrine/mongodb-odm": ">=1,<1.0.2", "doctrine/mongodb-odm-bundle": ">=2,<3.0.1", - "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1", + "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1|>=2.8.3,<2.8.4", "dolibarr/dolibarr": "<11.0.4", "dompdf/dompdf": ">=0.6,<0.6.2", "drupal/core": ">=7,<7.74|>=8,<8.8.11|>=8.9,<8.9.9|>=9,<9.0.8", @@ -12054,7 +12567,7 @@ "magento/magento1ee": ">=1,<1.14.4.3", "magento/product-community-edition": ">=2,<2.2.10|>=2.3,<2.3.2-p.2", "marcwillmann/turn": "<0.3.3", - "mautic/core": "<2.16.5|>=3,<3.2.4|= 2.13.1", + "mautic/core": "<3.3.2|= 2.13.1", "mediawiki/core": ">=1.27,<1.27.6|>=1.29,<1.29.3|>=1.30,<1.30.2|>=1.31,<1.31.9|>=1.32,<1.32.6|>=1.32.99,<1.33.3|>=1.33.99,<1.34.3|>=1.34.99,<1.35", "mittwald/typo3_forum": "<1.2.1", "monolog/monolog": ">=1.8,<1.12", @@ -12098,6 +12611,7 @@ "prestashop/contactform": ">1.0.1,<4.3", "prestashop/gamification": "<2.3.2", "prestashop/productcomments": ">=4,<4.2.1", + "prestashop/ps_emailsubscription": "<2.6.1", "prestashop/ps_facetedsearch": "<3.4.1", "privatebin/privatebin": "<1.2.2|>=1.3,<1.3.2", "propel/propel": ">=2-alpha.1,<=2-alpha.7", @@ -12267,7 +12781,7 @@ "type": "tidelift" } ], - "time": "2021-03-29T21:01:39+00:00" + "time": "2021-04-06T18:11:53+00:00" }, { "name": "sebastian/cli-parser", @@ -13297,16 +13811,16 @@ }, { "name": "spatie/laravel-ray", - "version": "1.17.1", + "version": "1.17.2", "source": { "type": "git", "url": "https://github.com/spatie/laravel-ray.git", - "reference": "c25f2c2cdf3221abce3b1250cb7296721acfd2b8" + "reference": "d2c839df7742c07a2515ea7eaf18deb90b2924df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-ray/zipball/c25f2c2cdf3221abce3b1250cb7296721acfd2b8", - "reference": "c25f2c2cdf3221abce3b1250cb7296721acfd2b8", + "url": "https://api.github.com/repos/spatie/laravel-ray/zipball/d2c839df7742c07a2515ea7eaf18deb90b2924df", + "reference": "d2c839df7742c07a2515ea7eaf18deb90b2924df", "shasum": "" }, "require": { @@ -13361,7 +13875,7 @@ ], "support": { "issues": "https://github.com/spatie/laravel-ray/issues", - "source": "https://github.com/spatie/laravel-ray/tree/1.17.1" + "source": "https://github.com/spatie/laravel-ray/tree/1.17.2" }, "funding": [ { @@ -13373,7 +13887,7 @@ "type": "other" } ], - "time": "2021-03-13T12:50:02+00:00" + "time": "2021-04-06T16:09:00+00:00" }, { "name": "spatie/macroable", diff --git a/docker-compose.yml b/docker-compose.yml index 489d0206..bcead804 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,24 +5,24 @@ networks: driver: bridge services: - nginx: - image: ${REGISTRY:-localhost}/devhub_nginx:latest - build: - context: ./ - dockerfile: .docker/develop/nginx/Dockerfile - cache_from: - - ${REGISTRY:-localhost}/devhub_nginx:latest - container_name: nginx - ports: - - "8090:80" - volumes: - - ./:/var/www/ - depends_on: - - php - - mysql - - redis - networks: - - devhub +# nginx: +# image: ${REGISTRY:-localhost}/devhub_nginx:latest +# build: +# context: ./ +# dockerfile: .docker/develop/nginx/Dockerfile +# cache_from: +# - ${REGISTRY:-localhost}/devhub_nginx:latest +# container_name: nginx +# ports: +# - "8090:80" +# volumes: +# - ./:/var/www/ +# depends_on: +# - php +# - mysql +# - redis +# networks: +# - devhub mysql: image: ${REGISTRY:-localhost}/devhub_mysql:latest @@ -55,14 +55,15 @@ services: networks: - devhub - php: + devhub: image: ${REGISTRY:-localhost}/devhub:latest build: context: ./ dockerfile: .docker/develop/php/Dockerfile cache_from: - ${REGISTRY:-localhost}/devhub:latest - container_name: php + container_name: devhub + tty: true environment: PHP_IDE_CONFIG: 'serverName=docker' volumes: @@ -70,7 +71,10 @@ services: # - ./.docker/develop/php/local.ini:/usr/local/etc/php/conf.d - ./.docker/develop/php/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini ports: - - "9000:9000" + - "8090:8000" + depends_on: + - mysql + - redis networks: - devhub diff --git a/resources/lang/ru/devhub.php b/resources/lang/ru/devhub.php index 04a3a660..908b946e 100644 --- a/resources/lang/ru/devhub.php +++ b/resources/lang/ru/devhub.php @@ -15,6 +15,7 @@ 'authors' => 'Авторы', 'beta' => 'Бета', 'undefined' => 'Неизвестно', + 'submit' => 'Отправить', 'register' => 'Зарегистрироваться', 'name' => 'Имя', 'karma' => 'Карма', diff --git a/resources/sass/tailwind.css b/resources/sass/tailwind.css index f10e1c0a..4fd3558c 100644 --- a/resources/sass/tailwind.css +++ b/resources/sass/tailwind.css @@ -32,7 +32,7 @@ } .textarea{ - @apply shadow-sm focus:ring-0 hover:border-cerulean-100 dark:hover:border-cerulean-500 focus:border-cerulean-500 mt-1 block w-full sm:text-sm rounded-md dark:border-gray-700 dark:text-gray-300 dark:bg-dpaper + @apply shadow-sm focus:ring-0 hover:border-cerulean-100 dark:hover:border-cerulean-500 focus:border-cerulean-100 mt-1 block w-full sm:text-sm rounded-md dark:border-gray-700 dark:text-gray-300 dark:bg-dpaper } .multiselect__tags, .multiselect__input, .multiselect__single, .multiselect__content-wrapper{ diff --git a/resources/views/include/footer.blade.php b/resources/views/include/footer.blade.php index 643c69a1..e91fee36 100644 --- a/resources/views/include/footer.blade.php +++ b/resources/views/include/footer.blade.php @@ -15,7 +15,8 @@ class="xs:h-8 mb-4 w-32 dark:hidden">

DevHub