From 21e0b1fa36f29f2c593b37b0a62b9a9f71bb8958 Mon Sep 17 00:00:00 2001 From: Marcin Tracz Date: Thu, 1 Jun 2023 14:09:05 +0200 Subject: [PATCH 1/5] add logs to supervisor laravel queue process --- environment/prod/app/supervisord.conf | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/environment/prod/app/supervisord.conf b/environment/prod/app/supervisord.conf index 6fc46ebf..03504d22 100644 --- a/environment/prod/app/supervisord.conf +++ b/environment/prod/app/supervisord.conf @@ -7,6 +7,9 @@ pidfile = /var/run/supervisord.pid user = root nodaemon = true +[supervisorctl] +serverurl = unix:///tmp/supervisor.sock + [program:nginx] command = nginx stdout_logfile = /dev/stdout @@ -23,9 +26,9 @@ stderr_logfile_maxbytes = 0 [program:laravel-queue-work] command = php /application/artisan queue:work --max-time=3600 -stdout_logfile = /dev/stdout +stdout_logfile = /var/log/supervisor/out-queue.log stdout_logfile_maxbytes = 0 -stderr_logfile = /dev/stderr +stderr_logfile = /var/log/supervisor/err-queue.log stderr_logfile_maxbytes = 0 [program:laravel-scheduler] From 060a1970a5e51a64b330eb289e074e4664ef2a3b Mon Sep 17 00:00:00 2001 From: Marcin Tracz Date: Thu, 1 Jun 2023 14:09:16 +0200 Subject: [PATCH 2/5] update dependabot --- .github/dependabot.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e62a29ad..c02d828b 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,6 +6,7 @@ updates: schedule: interval: monthly time: "06:30" + timezone: "Europe/Warsaw" commit-message: prefix: "- " target-branch: main @@ -16,7 +17,30 @@ updates: schedule: interval: monthly time: "06:30" + timezone: "Europe/Warsaw" commit-message: prefix: "- " target-branch: main open-pull-requests-limit: 1 + + - package-ecosystem: github-actions + directory: "/" + schedule: + interval: monthly + time: "06:30" + timezone: "Europe/Warsaw" + commit-message: + prefix: "- (github actions) " + target-branch: main + open-pull-requests-limit: 1 + + - package-ecosystem: docker + directory: "/environment/dev/app" + schedule: + interval: monthly + time: "06:30" + timezone: "Europe/Warsaw" + commit-message: + prefix: "- (docker dev) " + target-branch: main + open-pull-requests-limit: 1 From bde6004b2cfc1b7fb5b8a0ed0549e1a77813821b Mon Sep 17 00:00:00 2001 From: Marcin Tracz Date: Thu, 1 Jun 2023 14:38:56 +0200 Subject: [PATCH 3/5] composer update --- composer.json | 12 +- composer.lock | 557 +++++++++++++++++++++++++++----------------------- 2 files changed, 309 insertions(+), 260 deletions(-) diff --git a/composer.json b/composer.json index e9b8a8c8..3e225234 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "keywords": ["toby", "laravel", "hr"], "license": "MIT", "require": { - "php": "^8.1", + "php": "^8.2", "ext-pdo": "*", "ext-redis": "*", "azuyalabs/yasumi": "^2.6.0", @@ -14,21 +14,21 @@ "fakerphp/faker": "^1.22.0", "guzzlehttp/guzzle": "^7.7.0", "inertiajs/inertia-laravel": "^0.6.9", - "laravel/framework": "^10.12.0", + "laravel/framework": "^10.13.0", "laravel/sanctum": "^3.2.5", - "laravel/socialite": "^5.6.1", - "laravel/telescope": "^4.14.3", + "laravel/socialite": "^5.6.2", + "laravel/telescope": "^4.14.4", "laravel/tinker": "^2.8.1", "maatwebsite/excel": "^3.1.48", "phpoffice/phpword": "^1.1.0", "rackbeat/laravel-ui-avatars": "^1.2", - "sentry/sentry-laravel": "^3.4.0", + "sentry/sentry-laravel": "^3.4.1", "spatie/laravel-google-calendar": "^3.6.0", "spatie/laravel-model-states": "^2.4.6", "spatie/laravel-slack-slash-command": "^1.11.4" }, "require-dev": { - "blumilksoftware/codestyle": "^2.2.0", + "blumilksoftware/codestyle": "^2.3.0", "laravel/dusk": "^7.7.1", "mockery/mockery": "^1.5.1", "nunomaduro/collision": "^7.5.2", diff --git a/composer.lock b/composer.lock index f107f707..e695173e 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": "0925501c90f8878698c1f09c33399409", + "content-hash": "cb8289dd300f1f4d13a5de8a7b3f3146", "packages": [ { "name": "azuyalabs/yasumi", @@ -2426,16 +2426,16 @@ }, { "name": "laravel/framework", - "version": "v10.12.0", + "version": "v10.13.0", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "9e6dcff23ab1d4b522bef56074c31625cf077576" + "reference": "7322723585103082758d74917db62980684845cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/9e6dcff23ab1d4b522bef56074c31625cf077576", - "reference": "9e6dcff23ab1d4b522bef56074c31625cf077576", + "url": "https://api.github.com/repos/laravel/framework/zipball/7322723585103082758d74917db62980684845cb", + "reference": "7322723585103082758d74917db62980684845cb", "shasum": "" }, "require": { @@ -2622,7 +2622,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2023-05-23T18:04:16+00:00" + "time": "2023-05-30T14:46:25+00:00" }, { "name": "laravel/helpers", @@ -2808,16 +2808,16 @@ }, { "name": "laravel/socialite", - "version": "v5.6.1", + "version": "v5.6.2", "source": { "type": "git", "url": "https://github.com/laravel/socialite.git", - "reference": "a14a177f2cc71d8add71e2b19e00800e83bdda09" + "reference": "8789ccb422c0aa2c9b2d36aeb0b544f5c9c59586" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/socialite/zipball/a14a177f2cc71d8add71e2b19e00800e83bdda09", - "reference": "a14a177f2cc71d8add71e2b19e00800e83bdda09", + "url": "https://api.github.com/repos/laravel/socialite/zipball/8789ccb422c0aa2c9b2d36aeb0b544f5c9c59586", + "reference": "8789ccb422c0aa2c9b2d36aeb0b544f5c9c59586", "shasum": "" }, "require": { @@ -2832,6 +2832,7 @@ "require-dev": { "mockery/mockery": "^1.0", "orchestra/testbench": "^4.0|^5.0|^6.0|^7.0|^8.0", + "phpstan/phpstan": "^1.10", "phpunit/phpunit": "^8.0|^9.3" }, "type": "library", @@ -2873,20 +2874,20 @@ "issues": "https://github.com/laravel/socialite/issues", "source": "https://github.com/laravel/socialite" }, - "time": "2023-01-20T15:42:35+00:00" + "time": "2023-05-29T14:51:54+00:00" }, { "name": "laravel/telescope", - "version": "v4.14.3", + "version": "v4.14.4", "source": { "type": "git", "url": "https://github.com/laravel/telescope.git", - "reference": "d3de7650d846badfa067e2bc777392228a97df16" + "reference": "12cf59ce767e2984979a57c83891263be0e4c66a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/telescope/zipball/d3de7650d846badfa067e2bc777392228a97df16", - "reference": "d3de7650d846badfa067e2bc777392228a97df16", + "url": "https://api.github.com/repos/laravel/telescope/zipball/12cf59ce767e2984979a57c83891263be0e4c66a", + "reference": "12cf59ce767e2984979a57c83891263be0e4c66a", "shasum": "" }, "require": { @@ -2942,9 +2943,9 @@ ], "support": { "issues": "https://github.com/laravel/telescope/issues", - "source": "https://github.com/laravel/telescope/tree/v4.14.3" + "source": "https://github.com/laravel/telescope/tree/v4.14.4" }, - "time": "2023-05-19T18:34:30+00:00" + "time": "2023-05-29T15:04:52+00:00" }, { "name": "laravel/tinker", @@ -6720,16 +6721,16 @@ }, { "name": "sentry/sentry-laravel", - "version": "3.4.0", + "version": "3.4.1", "source": { "type": "git", "url": "https://github.com/getsentry/sentry-laravel.git", - "reference": "50ec5eae5d09d182d2d048981d0b45c24579a7f7" + "reference": "516df9df80414a71fa5464039746e8e98b066e09" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getsentry/sentry-laravel/zipball/50ec5eae5d09d182d2d048981d0b45c24579a7f7", - "reference": "50ec5eae5d09d182d2d048981d0b45c24579a7f7", + "url": "https://api.github.com/repos/getsentry/sentry-laravel/zipball/516df9df80414a71fa5464039746e8e98b066e09", + "reference": "516df9df80414a71fa5464039746e8e98b066e09", "shasum": "" }, "require": { @@ -6794,7 +6795,7 @@ ], "support": { "issues": "https://github.com/getsentry/sentry-laravel/issues", - "source": "https://github.com/getsentry/sentry-laravel/tree/3.4.0" + "source": "https://github.com/getsentry/sentry-laravel/tree/3.4.1" }, "funding": [ { @@ -6806,7 +6807,7 @@ "type": "custom" } ], - "time": "2023-05-08T14:15:56+00:00" + "time": "2023-05-31T10:43:06+00:00" }, { "name": "spatie/laravel-google-calendar", @@ -7085,23 +7086,23 @@ }, { "name": "symfony/console", - "version": "v6.2.11", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "5aa03db8ef0a5457c316ec580e69562d97734c77" + "reference": "8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/5aa03db8ef0a5457c316ec580e69562d97734c77", - "reference": "5aa03db8ef0a5457c316ec580e69562d97734c77", + "url": "https://api.github.com/repos/symfony/console/zipball/8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7", + "reference": "8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7", "shasum": "" }, "require": { "php": ">=8.1", - "symfony/deprecation-contracts": "^2.1|^3", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", - "symfony/service-contracts": "^1.1|^2|^3", + "symfony/service-contracts": "^2.5|^3", "symfony/string": "^5.4|^6.0" }, "conflict": { @@ -7123,12 +7124,6 @@ "symfony/process": "^5.4|^6.0", "symfony/var-dumper": "^5.4|^6.0" }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" - }, "type": "library", "autoload": { "psr-4": { @@ -7161,7 +7156,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v6.2.11" + "source": "https://github.com/symfony/console/tree/v6.3.0" }, "funding": [ { @@ -7177,20 +7172,20 @@ "type": "tidelift" } ], - "time": "2023-05-26T08:16:21+00:00" + "time": "2023-05-29T12:49:39+00:00" }, { "name": "symfony/css-selector", - "version": "v6.2.7", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", - "reference": "aedf3cb0f5b929ec255d96bbb4909e9932c769e0" + "reference": "88453e64cd86c5b60e8d2fb2c6f953bbc353ffbf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/css-selector/zipball/aedf3cb0f5b929ec255d96bbb4909e9932c769e0", - "reference": "aedf3cb0f5b929ec255d96bbb4909e9932c769e0", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/88453e64cd86c5b60e8d2fb2c6f953bbc353ffbf", + "reference": "88453e64cd86c5b60e8d2fb2c6f953bbc353ffbf", "shasum": "" }, "require": { @@ -7226,7 +7221,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v6.2.7" + "source": "https://github.com/symfony/css-selector/tree/v6.3.0" }, "funding": [ { @@ -7242,20 +7237,20 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:44:56+00:00" + "time": "2023-03-20T16:43:42+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v3.2.1", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e" + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", - "reference": "e2d1534420bd723d0ef5aec58a22c5fe60ce6f5e", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", "shasum": "" }, "require": { @@ -7264,7 +7259,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.3-dev" + "dev-main": "3.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -7293,7 +7288,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.1" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0" }, "funding": [ { @@ -7309,20 +7304,20 @@ "type": "tidelift" } ], - "time": "2023-03-01T10:25:55+00:00" + "time": "2023-05-23T14:45:45+00:00" }, { "name": "symfony/error-handler", - "version": "v6.2.11", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "e847ba47e7a8f9708082990cb40ab4ff0440a11e" + "reference": "99d2d814a6351461af350ead4d963bd67451236f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/e847ba47e7a8f9708082990cb40ab4ff0440a11e", - "reference": "e847ba47e7a8f9708082990cb40ab4ff0440a11e", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/99d2d814a6351461af350ead4d963bd67451236f", + "reference": "99d2d814a6351461af350ead4d963bd67451236f", "shasum": "" }, "require": { @@ -7330,8 +7325,11 @@ "psr/log": "^1|^2|^3", "symfony/var-dumper": "^5.4|^6.0" }, + "conflict": { + "symfony/deprecation-contracts": "<2.5" + }, "require-dev": { - "symfony/deprecation-contracts": "^2.1|^3", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/http-kernel": "^5.4|^6.0", "symfony/serializer": "^5.4|^6.0" }, @@ -7364,7 +7362,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v6.2.11" + "source": "https://github.com/symfony/error-handler/tree/v6.3.0" }, "funding": [ { @@ -7380,28 +7378,29 @@ "type": "tidelift" } ], - "time": "2023-05-05T11:55:01+00:00" + "time": "2023-05-10T12:03:13+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v6.2.8", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "04046f35fd7d72f9646e721fc2ecb8f9c67d3339" + "reference": "3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/04046f35fd7d72f9646e721fc2ecb8f9c67d3339", - "reference": "04046f35fd7d72f9646e721fc2ecb8f9c67d3339", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa", + "reference": "3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa", "shasum": "" }, "require": { "php": ">=8.1", - "symfony/event-dispatcher-contracts": "^2|^3" + "symfony/event-dispatcher-contracts": "^2.5|^3" }, "conflict": { - "symfony/dependency-injection": "<5.4" + "symfony/dependency-injection": "<5.4", + "symfony/service-contracts": "<2.5" }, "provide": { "psr/event-dispatcher-implementation": "1.0", @@ -7414,13 +7413,9 @@ "symfony/error-handler": "^5.4|^6.0", "symfony/expression-language": "^5.4|^6.0", "symfony/http-foundation": "^5.4|^6.0", - "symfony/service-contracts": "^1.1|^2|^3", + "symfony/service-contracts": "^2.5|^3", "symfony/stopwatch": "^5.4|^6.0" }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, "type": "library", "autoload": { "psr-4": { @@ -7447,7 +7442,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v6.2.8" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.3.0" }, "funding": [ { @@ -7463,33 +7458,30 @@ "type": "tidelift" } ], - "time": "2023-03-20T16:06:02+00:00" + "time": "2023-04-21T14:41:17+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.2.1", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "0ad3b6f1e4e2da5690fefe075cd53a238646d8dd" + "reference": "a76aed96a42d2b521153fb382d418e30d18b59df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/0ad3b6f1e4e2da5690fefe075cd53a238646d8dd", - "reference": "0ad3b6f1e4e2da5690fefe075cd53a238646d8dd", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/a76aed96a42d2b521153fb382d418e30d18b59df", + "reference": "a76aed96a42d2b521153fb382d418e30d18b59df", "shasum": "" }, "require": { "php": ">=8.1", "psr/event-dispatcher": "^1" }, - "suggest": { - "symfony/event-dispatcher-implementation": "" - }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.3-dev" + "dev-main": "3.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -7526,7 +7518,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.2.1" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.3.0" }, "funding": [ { @@ -7542,20 +7534,20 @@ "type": "tidelift" } ], - "time": "2023-03-01T10:32:47+00:00" + "time": "2023-05-23T14:45:45+00:00" }, { "name": "symfony/finder", - "version": "v6.2.7", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "20808dc6631aecafbe67c186af5dcb370be3a0eb" + "reference": "d9b01ba073c44cef617c7907ce2419f8d00d75e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/20808dc6631aecafbe67c186af5dcb370be3a0eb", - "reference": "20808dc6631aecafbe67c186af5dcb370be3a0eb", + "url": "https://api.github.com/repos/symfony/finder/zipball/d9b01ba073c44cef617c7907ce2419f8d00d75e2", + "reference": "d9b01ba073c44cef617c7907ce2419f8d00d75e2", "shasum": "" }, "require": { @@ -7590,7 +7582,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v6.2.7" + "source": "https://github.com/symfony/finder/tree/v6.3.0" }, "funding": [ { @@ -7606,28 +7598,32 @@ "type": "tidelift" } ], - "time": "2023-02-16T09:57:23+00:00" + "time": "2023-04-02T01:25:41+00:00" }, { "name": "symfony/http-client", - "version": "v6.2.11", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/http-client.git", - "reference": "39f679c12648cc43bd9f0db12cc69b82041b91a1" + "reference": "b2f892c91e4e02a939edddeb7ef452522d10a424" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client/zipball/39f679c12648cc43bd9f0db12cc69b82041b91a1", - "reference": "39f679c12648cc43bd9f0db12cc69b82041b91a1", + "url": "https://api.github.com/repos/symfony/http-client/zipball/b2f892c91e4e02a939edddeb7ef452522d10a424", + "reference": "b2f892c91e4e02a939edddeb7ef452522d10a424", "shasum": "" }, "require": { "php": ">=8.1", "psr/log": "^1|^2|^3", - "symfony/deprecation-contracts": "^2.1|^3", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/http-client-contracts": "^3", - "symfony/service-contracts": "^1.0|^2|^3" + "symfony/service-contracts": "^2.5|^3" + }, + "conflict": { + "php-http/discovery": "<1.15", + "symfony/http-foundation": "<6.3" }, "provide": { "php-http/async-client-implementation": "*", @@ -7643,7 +7639,6 @@ "guzzlehttp/promises": "^1.4", "nyholm/psr7": "^1.0", "php-http/httplug": "^1.0|^2.0", - "php-http/message-factory": "^1.0", "psr/http-client": "^1.0", "symfony/dependency-injection": "^5.4|^6.0", "symfony/http-kernel": "^5.4|^6.0", @@ -7679,7 +7674,7 @@ "http" ], "support": { - "source": "https://github.com/symfony/http-client/tree/v6.2.11" + "source": "https://github.com/symfony/http-client/tree/v6.3.0" }, "funding": [ { @@ -7695,32 +7690,29 @@ "type": "tidelift" } ], - "time": "2023-05-12T08:48:34+00:00" + "time": "2023-05-12T08:49:48+00:00" }, { "name": "symfony/http-client-contracts", - "version": "v3.2.1", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/http-client-contracts.git", - "reference": "df2ecd6cb70e73c1080e6478aea85f5f4da2c48b" + "reference": "3b66325d0176b4ec826bffab57c9037d759c31fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/df2ecd6cb70e73c1080e6478aea85f5f4da2c48b", - "reference": "df2ecd6cb70e73c1080e6478aea85f5f4da2c48b", + "url": "https://api.github.com/repos/symfony/http-client-contracts/zipball/3b66325d0176b4ec826bffab57c9037d759c31fb", + "reference": "3b66325d0176b4ec826bffab57c9037d759c31fb", "shasum": "" }, "require": { "php": ">=8.1" }, - "suggest": { - "symfony/http-client-implementation": "" - }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.3-dev" + "dev-main": "3.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -7760,7 +7752,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/http-client-contracts/tree/v3.2.1" + "source": "https://github.com/symfony/http-client-contracts/tree/v3.3.0" }, "funding": [ { @@ -7776,32 +7768,34 @@ "type": "tidelift" } ], - "time": "2023-03-01T10:32:47+00:00" + "time": "2023-05-23T14:45:45+00:00" }, { "name": "symfony/http-foundation", - "version": "v6.2.11", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "df27f4191a4292d01fd062296e09cbc8b657cb57" + "reference": "718a97ed430d34e5c568ea2c44eab708c6efbefb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/df27f4191a4292d01fd062296e09cbc8b657cb57", - "reference": "df27f4191a4292d01fd062296e09cbc8b657cb57", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/718a97ed430d34e5c568ea2c44eab708c6efbefb", + "reference": "718a97ed430d34e5c568ea2c44eab708c6efbefb", "shasum": "" }, "require": { "php": ">=8.1", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-mbstring": "~1.1" + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.1", + "symfony/polyfill-php83": "^1.27" }, "conflict": { "symfony/cache": "<6.2" }, "require-dev": { - "predis/predis": "~1.0", + "doctrine/dbal": "^2.13.1|^3.0", + "predis/predis": "^1.1|^2.0", "symfony/cache": "^5.4|^6.0", "symfony/dependency-injection": "^5.4|^6.0", "symfony/expression-language": "^5.4|^6.0", @@ -7809,9 +7803,6 @@ "symfony/mime": "^5.4|^6.0", "symfony/rate-limiter": "^5.2|^6.0" }, - "suggest": { - "symfony/mime": "To use the file extension guesser" - }, "type": "library", "autoload": { "psr-4": { @@ -7838,7 +7829,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v6.2.11" + "source": "https://github.com/symfony/http-foundation/tree/v6.3.0" }, "funding": [ { @@ -7854,29 +7845,29 @@ "type": "tidelift" } ], - "time": "2023-05-19T12:39:53+00:00" + "time": "2023-05-19T12:46:45+00:00" }, { "name": "symfony/http-kernel", - "version": "v6.2.11", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "954a1a3b178309b216261eedc735c079709e4ab3" + "reference": "241973f3dd900620b1ca052fe409144f11aea748" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/954a1a3b178309b216261eedc735c079709e4ab3", - "reference": "954a1a3b178309b216261eedc735c079709e4ab3", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/241973f3dd900620b1ca052fe409144f11aea748", + "reference": "241973f3dd900620b1ca052fe409144f11aea748", "shasum": "" }, "require": { "php": ">=8.1", "psr/log": "^1|^2|^3", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/error-handler": "^6.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/error-handler": "^6.3", "symfony/event-dispatcher": "^5.4|^6.0", - "symfony/http-foundation": "^5.4.21|^6.2.7", + "symfony/http-foundation": "^6.2.7", "symfony/polyfill-ctype": "^1.8" }, "conflict": { @@ -7884,15 +7875,18 @@ "symfony/cache": "<5.4", "symfony/config": "<6.1", "symfony/console": "<5.4", - "symfony/dependency-injection": "<6.2", + "symfony/dependency-injection": "<6.3", "symfony/doctrine-bridge": "<5.4", "symfony/form": "<5.4", "symfony/http-client": "<5.4", + "symfony/http-client-contracts": "<2.5", "symfony/mailer": "<5.4", "symfony/messenger": "<5.4", "symfony/translation": "<5.4", + "symfony/translation-contracts": "<2.5", "symfony/twig-bridge": "<5.4", "symfony/validator": "<5.4", + "symfony/var-dumper": "<6.3", "twig/twig": "<2.13" }, "provide": { @@ -7901,29 +7895,27 @@ "require-dev": { "psr/cache": "^1.0|^2.0|^3.0", "symfony/browser-kit": "^5.4|^6.0", + "symfony/clock": "^6.2", "symfony/config": "^6.1", "symfony/console": "^5.4|^6.0", "symfony/css-selector": "^5.4|^6.0", - "symfony/dependency-injection": "^6.2", + "symfony/dependency-injection": "^6.3", "symfony/dom-crawler": "^5.4|^6.0", "symfony/expression-language": "^5.4|^6.0", "symfony/finder": "^5.4|^6.0", - "symfony/http-client-contracts": "^1.1|^2|^3", + "symfony/http-client-contracts": "^2.5|^3", "symfony/process": "^5.4|^6.0", + "symfony/property-access": "^5.4.5|^6.0.5", "symfony/routing": "^5.4|^6.0", + "symfony/serializer": "^6.3", "symfony/stopwatch": "^5.4|^6.0", "symfony/translation": "^5.4|^6.0", - "symfony/translation-contracts": "^1.1|^2|^3", + "symfony/translation-contracts": "^2.5|^3", "symfony/uid": "^5.4|^6.0", + "symfony/validator": "^6.3", "symfony/var-exporter": "^6.2", "twig/twig": "^2.13|^3.0.4" }, - "suggest": { - "symfony/browser-kit": "", - "symfony/config": "", - "symfony/console": "", - "symfony/dependency-injection": "" - }, "type": "library", "autoload": { "psr-4": { @@ -7950,7 +7942,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v6.2.11" + "source": "https://github.com/symfony/http-kernel/tree/v6.3.0" }, "funding": [ { @@ -7966,20 +7958,20 @@ "type": "tidelift" } ], - "time": "2023-05-27T21:12:52+00:00" + "time": "2023-05-30T19:03:32+00:00" }, { "name": "symfony/mailer", - "version": "v6.2.8", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "bfcfa015c67e19c6fdb7ca6fe70700af1e740a17" + "reference": "7b03d9be1dea29bfec0a6c7b603f5072a4c97435" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/bfcfa015c67e19c6fdb7ca6fe70700af1e740a17", - "reference": "bfcfa015c67e19c6fdb7ca6fe70700af1e740a17", + "url": "https://api.github.com/repos/symfony/mailer/zipball/7b03d9be1dea29bfec0a6c7b603f5072a4c97435", + "reference": "7b03d9be1dea29bfec0a6c7b603f5072a4c97435", "shasum": "" }, "require": { @@ -7989,9 +7981,10 @@ "psr/log": "^1|^2|^3", "symfony/event-dispatcher": "^5.4|^6.0", "symfony/mime": "^6.2", - "symfony/service-contracts": "^1.1|^2|^3" + "symfony/service-contracts": "^2.5|^3" }, "conflict": { + "symfony/http-client-contracts": "<2.5", "symfony/http-kernel": "<5.4", "symfony/messenger": "<6.2", "symfony/mime": "<6.2", @@ -8029,7 +8022,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v6.2.8" + "source": "https://github.com/symfony/mailer/tree/v6.3.0" }, "funding": [ { @@ -8045,20 +8038,20 @@ "type": "tidelift" } ], - "time": "2023-03-14T15:00:05+00:00" + "time": "2023-05-29T12:49:39+00:00" }, { "name": "symfony/mime", - "version": "v6.2.10", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "b6c137fc53a9f7c4c951cd3f362b3734c7a97723" + "reference": "7b5d2121858cd6efbed778abce9cfdd7ab1f62ad" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/b6c137fc53a9f7c4c951cd3f362b3734c7a97723", - "reference": "b6c137fc53a9f7c4c951cd3f362b3734c7a97723", + "url": "https://api.github.com/repos/symfony/mime/zipball/7b5d2121858cd6efbed778abce9cfdd7ab1f62ad", + "reference": "7b5d2121858cd6efbed778abce9cfdd7ab1f62ad", "shasum": "" }, "require": { @@ -8112,7 +8105,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v6.2.10" + "source": "https://github.com/symfony/mime/tree/v6.3.0" }, "funding": [ { @@ -8128,25 +8121,25 @@ "type": "tidelift" } ], - "time": "2023-04-19T09:54:16+00:00" + "time": "2023-04-28T15:57:00+00:00" }, { "name": "symfony/options-resolver", - "version": "v6.2.7", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "aa0e85b53bbb2b4951960efd61d295907eacd629" + "reference": "a10f19f5198d589d5c33333cffe98dc9820332dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/aa0e85b53bbb2b4951960efd61d295907eacd629", - "reference": "aa0e85b53bbb2b4951960efd61d295907eacd629", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/a10f19f5198d589d5c33333cffe98dc9820332dd", + "reference": "a10f19f5198d589d5c33333cffe98dc9820332dd", "shasum": "" }, "require": { "php": ">=8.1", - "symfony/deprecation-contracts": "^2.1|^3" + "symfony/deprecation-contracts": "^2.5|^3" }, "type": "library", "autoload": { @@ -8179,7 +8172,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v6.2.7" + "source": "https://github.com/symfony/options-resolver/tree/v6.3.0" }, "funding": [ { @@ -8195,7 +8188,7 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:44:56+00:00" + "time": "2023-05-12T14:21:09+00:00" }, { "name": "symfony/polyfill-ctype", @@ -8773,6 +8766,83 @@ ], "time": "2022-11-03T14:55:06+00:00" }, + { + "name": "symfony/polyfill-php83", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php83.git", + "reference": "508c652ba3ccf69f8c97f251534f229791b52a57" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/508c652ba3ccf69f8c97f251534f229791b52a57", + "reference": "508c652ba3ccf69f8c97f251534f229791b52a57", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "symfony/polyfill-php80": "^1.14" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php83\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php83/tree/v1.27.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2022-11-03T14:55:06+00:00" + }, { "name": "symfony/polyfill-uuid", "version": "v1.27.0", @@ -8857,16 +8927,16 @@ }, { "name": "symfony/process", - "version": "v6.2.11", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "97ae9721bead9d1a39b5650e2f4b7834b93b539c" + "reference": "8741e3ed7fe2e91ec099e02446fb86667a0f1628" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/97ae9721bead9d1a39b5650e2f4b7834b93b539c", - "reference": "97ae9721bead9d1a39b5650e2f4b7834b93b539c", + "url": "https://api.github.com/repos/symfony/process/zipball/8741e3ed7fe2e91ec099e02446fb86667a0f1628", + "reference": "8741e3ed7fe2e91ec099e02446fb86667a0f1628", "shasum": "" }, "require": { @@ -8898,7 +8968,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.2.11" + "source": "https://github.com/symfony/process/tree/v6.3.0" }, "funding": [ { @@ -8914,7 +8984,7 @@ "type": "tidelift" } ], - "time": "2023-05-19T07:42:48+00:00" + "time": "2023-05-19T08:06:44+00:00" }, { "name": "symfony/psr-http-message-bridge", @@ -9006,16 +9076,16 @@ }, { "name": "symfony/routing", - "version": "v6.2.8", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "69062e2823f03b82265d73a966999660f0e1e404" + "reference": "827f59fdc67eecfc4dfff81f9c93bf4d98f0c89b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/69062e2823f03b82265d73a966999660f0e1e404", - "reference": "69062e2823f03b82265d73a966999660f0e1e404", + "url": "https://api.github.com/repos/symfony/routing/zipball/827f59fdc67eecfc4dfff81f9c93bf4d98f0c89b", + "reference": "827f59fdc67eecfc4dfff81f9c93bf4d98f0c89b", "shasum": "" }, "require": { @@ -9036,12 +9106,6 @@ "symfony/http-foundation": "^5.4|^6.0", "symfony/yaml": "^5.4|^6.0" }, - "suggest": { - "symfony/config": "For using the all-in-one router or any loader", - "symfony/expression-language": "For using expression matching", - "symfony/http-foundation": "For using a Symfony Request object", - "symfony/yaml": "For using the YAML loader" - }, "type": "library", "autoload": { "psr-4": { @@ -9074,7 +9138,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v6.2.8" + "source": "https://github.com/symfony/routing/tree/v6.3.0" }, "funding": [ { @@ -9090,20 +9154,20 @@ "type": "tidelift" } ], - "time": "2023-03-14T15:00:05+00:00" + "time": "2023-04-28T15:57:00+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.2.1", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "a8c9cedf55f314f3a186041d19537303766df09a" + "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/a8c9cedf55f314f3a186041d19537303766df09a", - "reference": "a8c9cedf55f314f3a186041d19537303766df09a", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", + "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", "shasum": "" }, "require": { @@ -9113,13 +9177,10 @@ "conflict": { "ext-psr": "<1.1|>=2" }, - "suggest": { - "symfony/service-implementation": "" - }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.3-dev" + "dev-main": "3.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -9159,7 +9220,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.2.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.3.0" }, "funding": [ { @@ -9175,20 +9236,20 @@ "type": "tidelift" } ], - "time": "2023-03-01T10:32:47+00:00" + "time": "2023-05-23T14:45:45+00:00" }, { "name": "symfony/string", - "version": "v6.2.8", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "193e83bbd6617d6b2151c37fff10fa7168ebddef" + "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/193e83bbd6617d6b2151c37fff10fa7168ebddef", - "reference": "193e83bbd6617d6b2151c37fff10fa7168ebddef", + "url": "https://api.github.com/repos/symfony/string/zipball/f2e190ee75ff0f5eced645ec0be5c66fac81f51f", + "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f", "shasum": "" }, "require": { @@ -9199,13 +9260,13 @@ "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/translation-contracts": "<2.0" + "symfony/translation-contracts": "<2.5" }, "require-dev": { "symfony/error-handler": "^5.4|^6.0", "symfony/http-client": "^5.4|^6.0", "symfony/intl": "^6.2", - "symfony/translation-contracts": "^2.0|^3.0", + "symfony/translation-contracts": "^2.5|^3.0", "symfony/var-exporter": "^5.4|^6.0" }, "type": "library", @@ -9245,7 +9306,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v6.2.8" + "source": "https://github.com/symfony/string/tree/v6.3.0" }, "funding": [ { @@ -9261,32 +9322,34 @@ "type": "tidelift" } ], - "time": "2023-03-20T16:06:02+00:00" + "time": "2023-03-21T21:06:29+00:00" }, { "name": "symfony/translation", - "version": "v6.2.11", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "64113df3e8b009f92fad63014f4ec647e65bc927" + "reference": "f72b2cba8f79dd9d536f534f76874b58ad37876f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/64113df3e8b009f92fad63014f4ec647e65bc927", - "reference": "64113df3e8b009f92fad63014f4ec647e65bc927", + "url": "https://api.github.com/repos/symfony/translation/zipball/f72b2cba8f79dd9d536f534f76874b58ad37876f", + "reference": "f72b2cba8f79dd9d536f534f76874b58ad37876f", "shasum": "" }, "require": { "php": ">=8.1", "symfony/polyfill-mbstring": "~1.0", - "symfony/translation-contracts": "^2.3|^3.0" + "symfony/translation-contracts": "^2.5|^3.0" }, "conflict": { "symfony/config": "<5.4", "symfony/console": "<5.4", "symfony/dependency-injection": "<5.4", + "symfony/http-client-contracts": "<2.5", "symfony/http-kernel": "<5.4", + "symfony/service-contracts": "<2.5", "symfony/twig-bundle": "<5.4", "symfony/yaml": "<5.4" }, @@ -9300,20 +9363,14 @@ "symfony/console": "^5.4|^6.0", "symfony/dependency-injection": "^5.4|^6.0", "symfony/finder": "^5.4|^6.0", - "symfony/http-client-contracts": "^1.1|^2.0|^3.0", + "symfony/http-client-contracts": "^2.5|^3.0", "symfony/http-kernel": "^5.4|^6.0", "symfony/intl": "^5.4|^6.0", "symfony/polyfill-intl-icu": "^1.21", "symfony/routing": "^5.4|^6.0", - "symfony/service-contracts": "^1.1.2|^2|^3", + "symfony/service-contracts": "^2.5|^3", "symfony/yaml": "^5.4|^6.0" }, - "suggest": { - "nikic/php-parser": "To use PhpAstExtractor", - "psr/log-implementation": "To use logging capability in translator", - "symfony/config": "", - "symfony/yaml": "" - }, "type": "library", "autoload": { "files": [ @@ -9343,7 +9400,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v6.2.11" + "source": "https://github.com/symfony/translation/tree/v6.3.0" }, "funding": [ { @@ -9359,32 +9416,29 @@ "type": "tidelift" } ], - "time": "2023-05-19T12:37:14+00:00" + "time": "2023-05-19T12:46:45+00:00" }, { "name": "symfony/translation-contracts", - "version": "v3.2.1", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "dfec258b9dd17a6b24420d464c43bffe347441c8" + "reference": "02c24deb352fb0d79db5486c0c79905a85e37e86" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/dfec258b9dd17a6b24420d464c43bffe347441c8", - "reference": "dfec258b9dd17a6b24420d464c43bffe347441c8", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/02c24deb352fb0d79db5486c0c79905a85e37e86", + "reference": "02c24deb352fb0d79db5486c0c79905a85e37e86", "shasum": "" }, "require": { "php": ">=8.1" }, - "suggest": { - "symfony/translation-implementation": "" - }, "type": "library", "extra": { "branch-alias": { - "dev-main": "3.3-dev" + "dev-main": "3.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -9424,7 +9478,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.2.1" + "source": "https://github.com/symfony/translation-contracts/tree/v3.3.0" }, "funding": [ { @@ -9440,20 +9494,20 @@ "type": "tidelift" } ], - "time": "2023-03-01T10:32:47+00:00" + "time": "2023-05-30T17:17:10+00:00" }, { "name": "symfony/uid", - "version": "v6.2.7", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/uid.git", - "reference": "d30c72a63897cfa043e1de4d4dd2ffa9ecefcdc0" + "reference": "01b0f20b1351d997711c56f1638f7a8c3061e384" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/uid/zipball/d30c72a63897cfa043e1de4d4dd2ffa9ecefcdc0", - "reference": "d30c72a63897cfa043e1de4d4dd2ffa9ecefcdc0", + "url": "https://api.github.com/repos/symfony/uid/zipball/01b0f20b1351d997711c56f1638f7a8c3061e384", + "reference": "01b0f20b1351d997711c56f1638f7a8c3061e384", "shasum": "" }, "require": { @@ -9498,7 +9552,7 @@ "uuid" ], "support": { - "source": "https://github.com/symfony/uid/tree/v6.2.7" + "source": "https://github.com/symfony/uid/tree/v6.3.0" }, "funding": [ { @@ -9514,20 +9568,20 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:44:56+00:00" + "time": "2023-04-08T07:25:02+00:00" }, { "name": "symfony/var-dumper", - "version": "v6.2.11", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "7d10f2a5a452bda385692fc7d38cd6eccfebe756" + "reference": "6acdcd5c122074ee9f7b051e4fb177025c277a0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/7d10f2a5a452bda385692fc7d38cd6eccfebe756", - "reference": "7d10f2a5a452bda385692fc7d38cd6eccfebe756", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/6acdcd5c122074ee9f7b051e4fb177025c277a0e", + "reference": "6acdcd5c122074ee9f7b051e4fb177025c277a0e", "shasum": "" }, "require": { @@ -9544,11 +9598,6 @@ "symfony/uid": "^5.4|^6.0", "twig/twig": "^2.13|^3.0.4" }, - "suggest": { - "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).", - "ext-intl": "To show region name in time zone dump", - "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script" - }, "bin": [ "Resources/bin/var-dump-server" ], @@ -9585,7 +9634,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.2.11" + "source": "https://github.com/symfony/var-dumper/tree/v6.3.0" }, "funding": [ { @@ -9601,7 +9650,7 @@ "type": "tidelift" } ], - "time": "2023-05-25T13:08:43+00:00" + "time": "2023-05-25T13:09:35+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", @@ -9876,16 +9925,16 @@ "packages-dev": [ { "name": "blumilksoftware/codestyle", - "version": "v2.2.0", + "version": "v2.3.0", "source": { "type": "git", "url": "https://github.com/blumilksoftware/codestyle.git", - "reference": "e7d822fe0c0bc099550c1bd429de393d350a356e" + "reference": "f8586205badb27f047e487d375e0963ba30dd641" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/blumilksoftware/codestyle/zipball/e7d822fe0c0bc099550c1bd429de393d350a356e", - "reference": "e7d822fe0c0bc099550c1bd429de393d350a356e", + "url": "https://api.github.com/repos/blumilksoftware/codestyle/zipball/f8586205badb27f047e487d375e0963ba30dd641", + "reference": "f8586205badb27f047e487d375e0963ba30dd641", "shasum": "" }, "require": { @@ -9920,9 +9969,9 @@ "description": "Blumilk codestyle configurator", "support": { "issues": "https://github.com/blumilksoftware/codestyle/issues", - "source": "https://github.com/blumilksoftware/codestyle/tree/v2.2.0" + "source": "https://github.com/blumilksoftware/codestyle/tree/v2.3.0" }, - "time": "2023-05-19T05:57:43+00:00" + "time": "2023-05-30T13:36:52+00:00" }, { "name": "composer/pcre", @@ -12519,16 +12568,16 @@ }, { "name": "symfony/filesystem", - "version": "v6.2.10", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "fd588debf7d1bc16a2c84b4b3b71145d9946b894" + "reference": "97b698e1d77d356304def77a8d0cd73090b359ea" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/fd588debf7d1bc16a2c84b4b3b71145d9946b894", - "reference": "fd588debf7d1bc16a2c84b4b3b71145d9946b894", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/97b698e1d77d356304def77a8d0cd73090b359ea", + "reference": "97b698e1d77d356304def77a8d0cd73090b359ea", "shasum": "" }, "require": { @@ -12562,7 +12611,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.2.10" + "source": "https://github.com/symfony/filesystem/tree/v6.3.0" }, "funding": [ { @@ -12578,7 +12627,7 @@ "type": "tidelift" } ], - "time": "2023-04-18T13:46:08+00:00" + "time": "2023-05-30T17:12:32+00:00" }, { "name": "symfony/polyfill-php81", @@ -12661,21 +12710,21 @@ }, { "name": "symfony/stopwatch", - "version": "v6.2.7", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "f3adc98c1061875dd2edcd45e5b04e63d0e29f8f" + "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/f3adc98c1061875dd2edcd45e5b04e63d0e29f8f", - "reference": "f3adc98c1061875dd2edcd45e5b04e63d0e29f8f", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", + "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", "shasum": "" }, "require": { "php": ">=8.1", - "symfony/service-contracts": "^1|^2|^3" + "symfony/service-contracts": "^2.5|^3" }, "type": "library", "autoload": { @@ -12703,7 +12752,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v6.2.7" + "source": "https://github.com/symfony/stopwatch/tree/v6.3.0" }, "funding": [ { @@ -12719,7 +12768,7 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:44:56+00:00" + "time": "2023-02-16T10:14:28+00:00" }, { "name": "theseer/tokenizer", @@ -12778,7 +12827,7 @@ "prefer-stable": true, "prefer-lowest": false, "platform": { - "php": "^8.1", + "php": "^8.2", "ext-pdo": "*", "ext-redis": "*" }, From dfa0c7d495319444ca5a402e91e4b3d3f22455cb Mon Sep 17 00:00:00 2001 From: Marcin Tracz Date: Thu, 1 Jun 2023 20:59:53 +0200 Subject: [PATCH 4/5] improve deployment --- .dockerignore | 1 + .env.example | 1 + .github/dependabot.yml | 2 +- .github/workflows/deploy-to-beta-manually.yml | 6 +-- .github/workflows/deploy-to-prod.yml | 50 +++++++++++++++---- .gitignore | 1 + Makefile | 42 +++++++++++----- environment/prod/app/Dockerfile | 21 ++++---- environment/prod/app/supervisord.conf | 9 ++-- .../deployment/beta/docker-compose.beta.yml | 7 +++ .../prod/deployment/prod/.env.prod.encrypted | 1 + environment/prod/deployment/prod/Makefile | 38 ++++++++++++++ .../deployment/prod/docker-compose.prod.yml | 9 +++- 13 files changed, 141 insertions(+), 47 deletions(-) create mode 100644 environment/prod/deployment/prod/.env.prod.encrypted create mode 100644 environment/prod/deployment/prod/Makefile rename docker-compose.prod.yml => environment/prod/deployment/prod/docker-compose.prod.yml (87%) diff --git a/.dockerignore b/.dockerignore index 90562201..6bdebe4c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -8,3 +8,4 @@ public/hot .phpunit.result.cache .env environment/prod/deployment/beta +environment/prod/deployment/prod diff --git a/.env.example b/.env.example index b7c54969..5f208363 100644 --- a/.env.example +++ b/.env.example @@ -69,3 +69,4 @@ DOCKER_TEST_DB_PASSWORD=${DB_PASSWORD} DOCKER_TEST_DB_ROOT_PASSWORD=${DB_ROOT_PASSWORD} BETA_ENV_KEY= +PROD_ENV_KEY= diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c02d828b..91883c95 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -35,7 +35,7 @@ updates: open-pull-requests-limit: 1 - package-ecosystem: docker - directory: "/environment/dev/app" + directory: "/environment/prod/app" schedule: interval: monthly time: "06:30" diff --git a/.github/workflows/deploy-to-beta-manually.yml b/.github/workflows/deploy-to-beta-manually.yml index 8b2143f5..cb96f617 100644 --- a/.github/workflows/deploy-to-beta-manually.yml +++ b/.github/workflows/deploy-to-beta-manually.yml @@ -60,9 +60,9 @@ jobs: build-args: DEPLOYMENT_PROJECT_VERSION_ARG=${{ env.DEPLOYMENT_PROJECT_VERSION }} labels: ${{ steps.meta.outputs.labels }} push: true - tags: ghcr.io/${{ github.repository_owner }}/toby:beta - cache-from: type=gha, ref=ghcr.io/${{ github.repository_owner }}/toby-beta-build-cache - cache-to: type=gha, ref=ghcr.io/${{ github.repository_owner }}/toby-beta-build-cache, mode=max + tags: ghcr.io/${{ github.repository_owner }}/${{ env.REPO_NAME }}:beta + cache-from: type=gha, ref=ghcr.io/${{ github.repository_owner }}/${{ env.REPO_NAME }}-beta-build-cache + cache-to: type=gha, ref=ghcr.io/${{ github.repository_owner }}/${{ env.REPO_NAME }}-beta-build-cache, mode=max - name: copy files via ssh uses: appleboy/scp-action@v0.1.4 diff --git a/.github/workflows/deploy-to-prod.yml b/.github/workflows/deploy-to-prod.yml index 5fa127c0..231980e4 100644 --- a/.github/workflows/deploy-to-prod.yml +++ b/.github/workflows/deploy-to-prod.yml @@ -14,10 +14,15 @@ jobs: environment: production runs-on: ubuntu-22.04 name: Deploy to production + env: + REPO_NAME: toby steps: - name: checkout uses: actions/checkout@v3 + - name: set deployment project version + run: echo "DEPLOYMENT_PROJECT_VERSION=$(bash ./environment/prod/deployment/scripts/version.sh --long)" >> $GITHUB_ENV + - name: set up Docker Buildx uses: docker/setup-buildx-action@v2 @@ -28,19 +33,45 @@ jobs: username: ${{ github.actor }} password: ${{ github.token }} + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: ghcr.io/${{ github.repository_owner }}/${{ env.REPO_NAME }} + tags: | + type=raw,value=latest + type=raw,value=${{ github.ref_name }} + context: git + - name: build and push image uses: docker/build-push-action@v4 with: context: . file: ./environment/prod/app/Dockerfile + build-args: DEPLOYMENT_PROJECT_VERSION_ARG=${{ env.DEPLOYMENT_PROJECT_VERSION }} + labels: ${{ steps.meta.outputs.labels }} push: true tags: | - ghcr.io/${{ github.repository_owner }}/toby:latest - ghcr.io/${{ github.repository_owner }}/toby:${{ github.ref_name }} - cache-from: type=gha, ref=ghcr.io/${{ github.repository_owner }}/toby-prod-build-cache - cache-to: type=gha, ref=ghcr.io/${{ github.repository_owner }}/toby-prod-build-cache, mode=max + ghcr.io/${{ github.repository_owner }}/${{ env.REPO_NAME }}:latest + ghcr.io/${{ github.repository_owner }}/${{ env.REPO_NAME }}:${{ github.ref_name }} + cache-from: type=gha, ref=ghcr.io/${{ github.repository_owner }}/${{ env.REPO_NAME }}-prod-build-cache + cache-to: type=gha, ref=ghcr.io/${{ github.repository_owner }}/${{ env.REPO_NAME }}-prod-build-cache, mode=max + + - name: copy files via ssh + uses: appleboy/scp-action@v0.1.4 + with: + timeout: 10s + command_timeout: 10m + host: ${{ secrets.VPS_OVH_BF7EC892_HOST }} + port: ${{ secrets.VPS_OVH_BF7EC892_PORT }} + username: ${{ secrets.VPS_OVH_BF7EC892_USERNAME }} + key: ${{ secrets.VPS_OVH_BF7EC892_SSH_PRIVATE_KEY }} + passphrase: ${{ secrets.VPS_OVH_BF7EC892_SSH_PRIVATE_KEY_PASSPHRASE }} + source: "./environment/prod/deployment/prod/*,./environment/prod/deployment/scripts/*" + target: ${{ secrets.TOBY_VPS_LIVE_APP_PATH }} + rm: true - - uses: appleboy/ssh-action@v0.1.8 + - uses: appleboy/ssh-action@v0.1.10 env: BRANCH_NAME: "main" with: @@ -53,9 +84,6 @@ jobs: passphrase: ${{ secrets.VPS_OVH_BF7EC892_SSH_PRIVATE_KEY_PASSPHRASE }} script_stop: true script: | - cd ${{ secrets.TOBY_VPS_LIVE_APP_PATH }} - git fetch - git checkout --force "${{ env.BRANCH_NAME }}" - git pull - make prod-deploy - docker images --filter dangling=true | grep "ghcr.io/blumilksoftware/toby" | awk '{print $3}'| xargs --no-run-if-empty docker rmi + cd ${{ secrets.TOBY_VPS_LIVE_APP_PATH }}/environment/prod/deployment/prod + make prod-deploy PROD_ENV_KEY=${{ secrets.PROD_ENV_KEY }} + docker images --filter dangling=true | grep "ghcr.io/blumilksoftware/${{ env.REPO_NAME }}" | awk '{print $3}'| xargs --no-run-if-empty docker rmi diff --git a/.gitignore b/.gitignore index eaf8a217..96ac070b 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ .env .env.backup .env.beta +.env.prod .phpunit.result.cache docker-compose.override.yml Homestead.json diff --git a/Makefile b/Makefile index 6bcc4587..81229017 100644 --- a/Makefile +++ b/Makefile @@ -8,22 +8,10 @@ SHELL := /bin/bash DOCKER_COMPOSE_FILE = docker-compose.yml DOCKER_COMPOSE_APP_CONTAINER = php -DOCKER_COMPOSE_PROD_FILENAME = docker-compose.prod.yml -PROD_DOCKER_EXEC = docker compose --file ${DOCKER_COMPOSE_PROD_FILENAME} exec --workdir /application/environment/scripts - CURRENT_USER_ID = $(shell id --user) CURRENT_USER_GROUP_ID = $(shell id --group) CURRENT_DIR = $(shell pwd) -prod-deploy: - docker compose --file ${DOCKER_COMPOSE_PROD_FILENAME} up --force-recreate --detach && \ - echo "App post deploy actions" && \ - ${PROD_DOCKER_EXEC} toby-prod-app bash post-deploy-actions.sh - -prod-reload-config: - echo "App config reload" && \ - ${PROD_DOCKER_EXEC} toby-prod-app bash reload-config.sh - build: @docker compose --file ${DOCKER_COMPOSE_FILE} build --pull @@ -75,4 +63,32 @@ decrypt-beta-env: && mv .env.beta /envs \ && rm .env.beta.encrypted" -.PHONY: prod-deploy prod-reload-config build run stop restart shell test fix queue encrypt-beta-env decrypt-beta-env +encrypt-prod-env: + @docker compose --file ${DOCKER_COMPOSE_FILE} run \ + --rm \ + --no-deps \ + --volume ${CURRENT_DIR}/environment/prod/deployment/prod:/envs \ + --entrypoint "" \ + --workdir /application \ + --user "${CURRENT_USER_ID}:${CURRENT_USER_GROUP_ID}" \ + ${DOCKER_COMPOSE_APP_CONTAINER} \ + bash -c "cp /envs/.env.prod /application \ + && php artisan env:encrypt --env prod --key ${PROD_ENV_KEY} \ + && mv .env.prod.encrypted /envs \ + && rm .env.prod" + +decrypt-prod-env: + @docker compose --file ${DOCKER_COMPOSE_FILE} run \ + --rm \ + --no-deps \ + --volume ${CURRENT_DIR}/environment/prod/deployment/prod:/envs \ + --entrypoint "" \ + --workdir /application \ + --user "${CURRENT_USER_ID}:${CURRENT_USER_GROUP_ID}" \ + ${DOCKER_COMPOSE_APP_CONTAINER} \ + bash -c "cp /envs/.env.prod.encrypted /application \ + && php artisan env:decrypt --env prod --key ${PROD_ENV_KEY} \ + && mv .env.prod /envs \ + && rm .env.prod.encrypted" + +.PHONY: build run stop restart shell test fix queue encrypt-beta-env decrypt-beta-env encrypt-prod-env decrypt-prod-env diff --git a/environment/prod/app/Dockerfile b/environment/prod/app/Dockerfile index 1cc068b7..e3143541 100644 --- a/environment/prod/app/Dockerfile +++ b/environment/prod/app/Dockerfile @@ -1,9 +1,5 @@ -ARG PHP_VERSION=8.2.4-fpm-bullseye -ARG NODE_VERSION=19-alpine3.16 -ARG COMPOSER_VERSION=2.5.4 - ### PHP DEPENDENCIES ### -FROM composer:${COMPOSER_VERSION} as vendor +FROM composer:2.5.5 as vendor WORKDIR /app_composer_dependencies @@ -18,7 +14,7 @@ RUN composer install \ --ignore-platform-reqs ### FRONTEND ### -FROM node:${NODE_VERSION} as frontend +FROM node:20.2.0-alpine3.17 as frontend WORKDIR /app_frontend_dependencies @@ -32,12 +28,12 @@ COPY resources/css ./resources/css/ RUN npm run build ### APPLICATION ### -FROM php:${PHP_VERSION} as app +FROM php:8.2.6-fpm-bullseye as app COPY --from=vendor /usr/bin/composer /usr/local/bin/composer # For other versions check: http://nginx.org/packages/mainline/debian/pool/nginx/n/nginx/ -ARG NGINX_VERSION="1.23.3-1~bullseye" +ARG NGINX_VERSION="1.25.0-1~bullseye" # Install Postgresql client (https://www.postgresql.org/download/linux/debian/) ARG POSTGRESQL_CLIENT_VERSION=15 ARG PHPREDIS_VERSION=5.3.7 @@ -58,15 +54,16 @@ RUN apt-get update \ libpng-dev \ supervisor \ cron \ - && pecl install redis-${PHPREDIS_VERSION} \ - && docker-php-ext-install \ + && pecl install \ + redis-${PHPREDIS_VERSION} \ + && docker-php-ext-install \ pdo_pgsql \ zip \ gd \ opcache \ - && docker-php-ext-configure \ + && docker-php-ext-configure \ zip \ - && docker-php-ext-enable \ + && docker-php-ext-enable \ redis RUN mv "${PHP_INI_DIR}/php.ini-production" "${PHP_INI_DIR}/php.ini" diff --git a/environment/prod/app/supervisord.conf b/environment/prod/app/supervisord.conf index 03504d22..e6eaece3 100644 --- a/environment/prod/app/supervisord.conf +++ b/environment/prod/app/supervisord.conf @@ -7,9 +7,6 @@ pidfile = /var/run/supervisord.pid user = root nodaemon = true -[supervisorctl] -serverurl = unix:///tmp/supervisor.sock - [program:nginx] command = nginx stdout_logfile = /dev/stdout @@ -25,10 +22,10 @@ stderr_logfile = /dev/stderr stderr_logfile_maxbytes = 0 [program:laravel-queue-work] -command = php /application/artisan queue:work --max-time=3600 -stdout_logfile = /var/log/supervisor/out-queue.log +command = php /application/artisan queue:work --timeout=3600 --tries=3 +stdout_logfile = /dev/stdout stdout_logfile_maxbytes = 0 -stderr_logfile = /var/log/supervisor/err-queue.log +stderr_logfile = /dev/stderr stderr_logfile_maxbytes = 0 [program:laravel-scheduler] diff --git a/environment/prod/deployment/beta/docker-compose.beta.yml b/environment/prod/deployment/beta/docker-compose.beta.yml index ef21d0ec..b09163c5 100644 --- a/environment/prod/deployment/beta/docker-compose.beta.yml +++ b/environment/prod/deployment/beta/docker-compose.beta.yml @@ -33,6 +33,8 @@ services: depends_on: toby-beta-database: condition: service_healthy + toby-beta-redis: + condition: service_healthy working_dir: /application volumes: - ./.env:/application/.env:ro @@ -65,6 +67,11 @@ services: toby-beta-redis: image: redis:7.0-alpine3.16 container_name: toby-beta-redis + healthcheck: + test: [ "CMD-SHELL", "redis-cli ping | grep PONG" ] + interval: 3s + timeout: 3s + retries: 5 volumes: - toby-beta-redis-data:/data networks: diff --git a/environment/prod/deployment/prod/.env.prod.encrypted b/environment/prod/deployment/prod/.env.prod.encrypted new file mode 100644 index 00000000..d2d9219a --- /dev/null +++ b/environment/prod/deployment/prod/.env.prod.encrypted @@ -0,0 +1 @@ +eyJpdiI6InFZbndLMVZ5NERsOFV1c1JpdFR6OUE9PSIsInZhbHVlIjoiYjhPQzlCOHE0c0VtNjUyNC8vYnJmdlhFWmo1WG5vT2ovdkU4azhnZTNlYU9CZUc1RWtWM1pnNVBFTTlnNDBNeVhHc2owZ3pVU0lWcGhReTFUWWxzbGpDTjdmRllZQ0IyMEE2RklyMUZuT2Z1TVFOSTZjNjBuR0RBeG0wUVJSdGxUS3hjOHRUdHJhQUpNQ0QvTDBGdkVmSDJ4ZW9tdW9HcDNEMVJRUytsMWNGK21xUVludUk3eDRGVk03UXVQS3dGckRXdUd5K0dpNGtWaHpGa0ZGeVlETDZVcWwrK0lFc2c1ekR1TkQvamY0cGZocGlMQnZKZlNuNlNCVEIzT0Z6QkozQkpQczN5QUZVYllJWU5xWC8xZDN4QXVZQ3ZxbmlkSE9rQWJJSERybllvUERUeWFwM21BMzdPM1dIQ3hqNW9HZUlnU29OKzdqcytiK3dDUUpTSE45bEl1aThia25hbHZmMXhXWWdpTGY1OEVtTDAydmtubjh6KytKODBLN2puYitsVXNvdDFqRCs2RFM1WVVRMWk4RVdEYmt4VWgrTVF3b0NRMVRxWkJ2SldPMnBQSzB4ZFgrWG9HNDg4U2pPUnNRMGRWcU5yWUNNZkZvWXNiUmNGRlR0L2ZGaXRLTTFoYmVFRFRPa3AzeE91NXdkU1VDMnFLQnVpbUdSb1JUdkF5YVhnZnA1V2htQ3BOTUdNWVc1dy9tQ01Vc0EzQU04RGIvYmZJOG9NbWdsSFBVMGcxczUzai9nU0RLR2FMYVRVZGhvK0daSzNPNVk0N0IwVm9ZOUZFZGpSVlp1VVFwcVFQSHNBZk9MaTcwZnhiMTZCMmVPVHkwVGp4V3c1eWY2RS9US25rQmFzdTRsR2ZWNmdrbUtxL0l2aW4yajYwenl5RHZ3REhXSTh2VnJiSnpjNUtMc1lkaVpFNERxam9iYWhuUDRPbG1Zb3h5T0RyeEZVYmFXY04zd1c3c0NTSzhVOFpneE56dDFNTzRBSk9nbXVEZFdJUGRFVVV5UjhBZjMyWmtCWkhZK1U0ZmJaKy9kVlhEaHFXWGIyaFloM3Z6UlR6NG56Q2lJTHJ2KzV3UlBqUDA2UEJUWWI1YkVtUXJPR25KTmdwbndFUlFWMWFjZ2dCejVCWHI3UjFWZ3UvV0k5Uk9pTXloNytaMXpXaGpoUnZNdk01WnN2WlZCeWQrZStMMnQ2K0ZXOG1mRkdKM1BTU1Y2NmdzVW9wdldwOHlmTXpPTStERjZGV2FwUkR0cGNPOHFKS2FUN0tMTWJqTnpKTzEyWUZOWHZrYVpqTG9FUmd3TWY1TnNrK2RKQ054QXFXTHFvd1lKU05aeEFua2JCN2oxY2loOWVCYnRLKzF5Zk1HUFdFZzZ3OW8vRzA2Q3hoR0EwNmhYY0NTVVZkb3RGYlBhOW1QaGx5bkhqYmppa0t1Rk40eWRoTUgwaElzUFRwUHE1MDBuWm03VDA5akg1UHU1Q2J0NnZrRU11YW5sQnl6ZXhKWmhnc3YrdmU0YlBWRktFUFVHazlNTnJHaUVMeGZEeVhLL2REbUUwRFJJeWx4S3RlU05zRHVPNmdlU2l6S3YwVkhxM2ZMeHJvcFhmd2FFaExPWGV0c25vb0k3N05QbHp3dHhEWng4Ym12NkxORzVDa0xIc2JIeEtZSkVmSUZIalVwbVpoR3VMZGFhZi8xejVwaFhya0NmQWgyc1BxRU9hLzVKekFuRVMxYU1YNk51Mmx3eEVsaEc5Y01RODBZQ0NoUmVQZVpXMXpSeUdVanRCZHBJVHUyUkh5dXJtY3kvZVRTNGltSHFiL1FsenI5T0NVZEQyMWxic29naTJjY2xmT0NIcmhYUmp6LzZEc1pSZzMxR1dTeCtieWdyaUVtWC9sazBmcCtSS0hBdXhtMG9RaHcvM092TXJmZFptMWtONVVaelI0Y21YQi9qRC9RVWxyUUxXaWZUMmN4VDdRaWVtTkZxcHExb3hERS94dTgrZkJRMWJtbFozbjZreEh5T2lCQUZHZm01U0ZHSzFFcmhnRkQyUzYvRy9GdXFTWnduUzRGc1FWMkF5UkhNVWhJVVJiQVZnb0xjQWpNd3IzVmpOaE5jaE5URTl6bVowTUZaQXh0clpPeFJDMjJhZ2tXbUJINUtha1BTTzdiNEx1UnRXV2FEOXVZV1RaWU5DbitHanZqQytVemh2RlRjY3ZBK2U2ck1PTG9nTXpGdWtGNk80R3pvV0loOEVjSGhYZzM0SEpwY3pIL3hESGszSzU3MThCNzNlWE5LdGR6OE9IMjQzQUR0S3Nzai95LzNQclNQRVZFelh6bG9JWEJsYkVsNWRKOGQ1TjZ3S1I1UXM0bFliaDBCeWxYbnZuZW1ZWTlURnEvakhWSE9vVEcrVGYreGpEakQzdnlTTjNUM0tnbjQ0VmJBRnFhYTVzUXE5UXhoWkhWV0dkY1NoVVRvdXZsUDlCaTZOLzF3Q0FBcXRGYStORDByRzRTZGtBVjVGMnVaU0FEMWJMNUhsUFNoQlNTTEk0RnRHZ3owekw5ZDhCZ2swRkFFV3kvY2ZmdDAvTE9tMmVpb3ZDWGlJZlptWXN6N1NVcGZ4ZUNDcEtJK0ZzWlkxdkdvVEdkNVA4U1J3a29GakNJUkJLbHRuSUNwQ3VvOXFLWEdydjNaOXNIUHZ3UGpHcmF5ZVgxS2NPZTlHK3FFdmUxT1M1cGtMMFJsbkNnVE1XZmMva3Zyc2MwTUp5R3lqb0tRUW1DR3ZKU0pXN01qNTdpZG16WjJpa0ZVNDFmVVhvckxxeHhMSk9GOVdUdTg0S3AxNS8vMlptY0Fjd0IrTktzZFRQbWRqamRUOGZnVDllR2VNTEN4czJFc1h2b1VvWWllMndDblpuL1E3VFRTLzE5SnloOVZtUFZzaEIyZ1VIQW5Zd25Mc3lxbStuQ1I1UW5DUFNxcnMxWlAyMmVQcHFBRjNsUFVqLzJwU0l2VC81RjVOVWlMc0hTOEhTSEEzaWZnV3RyY29LcXFjTGNsUkl4YkpubHBBaTZGZkIyVVRrUll4eVZjPSIsIm1hYyI6Ijg4ZDgwY2Y5OTM3Yzk4M2I2MWMxZGZjMmM2YTBkNDVjNWQ1MThkMDg2NWE5MmQwNzQ3Y2YxZTQ5ZjA0MDA0MWUiLCJ0YWciOiIifQ== \ No newline at end of file diff --git a/environment/prod/deployment/prod/Makefile b/environment/prod/deployment/prod/Makefile new file mode 100644 index 00000000..11a76b73 --- /dev/null +++ b/environment/prod/deployment/prod/Makefile @@ -0,0 +1,38 @@ +export COMPOSE_DOCKER_CLI_BUILD = 1 +export DOCKER_BUILDKIT = 1 + +DOCKER_COMPOSE_FILENAME = docker-compose.prod.yml +DOCKER_COMPOSE_APP_CONTAINER = toby-prod-app + +DOCKER_EXEC_SCRIPT = docker compose --file ${DOCKER_COMPOSE_FILENAME} exec --workdir /application/environment/prod/deployment/scripts ${DOCKER_COMPOSE_APP_CONTAINER} bash +DOCKER_EXEC_ARTISAN_COMMAND = docker compose --file ${DOCKER_COMPOSE_FILENAME} exec ${DOCKER_COMPOSE_APP_CONTAINER} php artisan + +PROD_DOCKER_IMAGE = ghcr.io/blumilksoftware/toby:latest + +CURRENT_DIR = $(shell pwd) + +prod-deploy: decrypt-prod-env create-deployment-file + @docker compose --file ${DOCKER_COMPOSE_FILENAME} up --force-recreate --detach && \ + echo "App post deploy actions" && \ + ${DOCKER_EXEC_SCRIPT} post-deploy-actions.sh + +decrypt-prod-env: + @docker run \ + --rm \ + --volume ${CURRENT_DIR}:/envs \ + --entrypoint "" \ + --workdir /application \ + ${PROD_DOCKER_IMAGE} \ + bash -c "cp /envs/.env.prod.encrypted /application \ + && php artisan env:decrypt --env prod --key ${PROD_ENV_KEY} \ + && cp .env.prod /envs/.env.prod \ + && cp .env.prod /envs/.env" + +DEPLOYMENT_DATETIME = $(shell TZ=Europe/Warsaw date --rfc-3339=seconds) + +create-deployment-file: + @echo "\ + DEPLOY_DATE='${DEPLOYMENT_DATETIME}'\ + " > .deployment + +.PHONY: prod-deploy decrypt-prod-env create-deployment-file diff --git a/docker-compose.prod.yml b/environment/prod/deployment/prod/docker-compose.prod.yml similarity index 87% rename from docker-compose.prod.yml rename to environment/prod/deployment/prod/docker-compose.prod.yml index 54bbe32f..f1a01af8 100644 --- a/docker-compose.prod.yml +++ b/environment/prod/deployment/prod/docker-compose.prod.yml @@ -36,6 +36,8 @@ services: depends_on: toby-prod-database: condition: service_healthy + toby-prod-redis: + condition: service_healthy working_dir: /application volumes: - duplicati-source:/backup @@ -56,7 +58,7 @@ services: - POSTGRES_USER=${DOCKER_TOBY_PROD_DB_USERNAME:? variable DOCKER_TOBY_PROD_DB_USERNAME not set} - POSTGRES_PASSWORD=${DOCKER_TOBY_PROD_DB_PASSWORD:? variable DOCKER_TOBY_PROD_DB_PASSWORD not set} healthcheck: - test: "pg_isready" + test: [ "CMD-SHELL", "pg_isready --dbname ${DOCKER_TOBY_PROD_DB_DATABASE} --username ${DOCKER_TOBY_PROD_DB_USERNAME}"] interval: 3s timeout: 3s retries: 5 @@ -69,6 +71,11 @@ services: toby-prod-redis: image: redis:7.0-alpine3.16 container_name: toby-prod-redis + healthcheck: + test: [ "CMD-SHELL", "redis-cli ping | grep PONG" ] + interval: 3s + timeout: 3s + retries: 5 volumes: - toby-prod-redis-data:/data networks: From 03ba0ac241e484851e98226da959752ad92cdcac Mon Sep 17 00:00:00 2001 From: Marcin Tracz Date: Thu, 1 Jun 2023 21:04:19 +0200 Subject: [PATCH 5/5] update readme --- readme.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/readme.md b/readme.md index 217e2aa0..ec120127 100644 --- a/readme.md +++ b/readme.md @@ -127,3 +127,20 @@ encrypt: make encrypt-beta-env ``` Files are in `./environment/prod/deployment/beta` + +--- +**Production** +- set `PROD_ENV_KEY` in `.env` file, which will be used to encrypt/decrypt + +decrypt: +```shell +# this will decrypt .env.prod.encrypted and create/override .env.prod file +make decrypt-prod-env +``` + +encrypt: +```shell +# this will encrypt .env.prod file and create/override .env.prod.encrypted file +make encrypt-prod-env +``` +Files are in `./environment/prod/deployment/prod`