Compare commits

...

5 Commits

Author SHA1 Message Date
7dc4fdd1c0 fix : doc de déploiement
All checks were successful
Auto Tag Develop / tag (push) Successful in 5s
Build Release Artefact / build (push) Successful in 1m11s
2026-01-22 16:06:33 +01:00
5395dfefda fix : modification du script de déploiement pour corriger le problème d'écriture des logs de prod
All checks were successful
Auto Tag Develop / tag (push) Successful in 5s
Build Release Artefact / build (push) Successful in 1m11s
2026-01-22 11:50:46 +01:00
c4f4107512 fix : affiche plus détail dans les logs en recette/prod
All checks were successful
Auto Tag Develop / tag (push) Successful in 4s
Build Release Artefact / build (push) Successful in 1m10s
2026-01-22 11:27:28 +01:00
22f26ddb38 feat : Ajout du bundle Monolog pour la gestion des logs
All checks were successful
Auto Tag Develop / tag (push) Successful in 5s
Build Release Artefact / build (push) Successful in 1m13s
2026-01-22 11:00:06 +01:00
d3289c8497 fix : correction du path URI pour la création d'un poids dans une réception
All checks were successful
Auto Tag Develop / tag (push) Successful in 5s
Build Release Artefact / build (push) Successful in 1m13s
2026-01-22 10:21:45 +01:00
15 changed files with 530 additions and 48 deletions

3
.idea/ferme.iml generated
View File

@@ -147,6 +147,9 @@
<excludeFolder url="file://$MODULE_DIR$/vendor/thecodingmachine/safe" />
<excludeFolder url="file://$MODULE_DIR$/vendor/lcobucci/jwt" />
<excludeFolder url="file://$MODULE_DIR$/vendor/lexik/jwt-authentication-bundle" />
<excludeFolder url="file://$MODULE_DIR$/vendor/monolog/monolog" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/monolog-bridge" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/monolog-bundle" />
<excludePattern pattern="reference.php" />
</content>
<orderEntry type="inheritedJdk" />

3
.idea/php.xml generated
View File

@@ -153,6 +153,9 @@
<path value="$PROJECT_DIR$/vendor/dompdf/php-font-lib" />
<path value="$PROJECT_DIR$/vendor/lexik/jwt-authentication-bundle" />
<path value="$PROJECT_DIR$/vendor/lcobucci/jwt" />
<path value="$PROJECT_DIR$/vendor/monolog/monolog" />
<path value="$PROJECT_DIR$/vendor/symfony/monolog-bundle" />
<path value="$PROJECT_DIR$/vendor/symfony/monolog-bridge" />
</include_path>
</component>
<component name="PhpProjectSharedConfiguration" php_language_level="8.4" />

58
.idea/workspace.xml generated
View File

@@ -4,10 +4,9 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="7c107abe-5995-4428-8429-b146aaca8386" name="Changes" comment="ci : fix release artefact">
<list default="true" id="7c107abe-5995-4428-8429-b146aaca8386" name="Changes" comment="fix : modification du script de déploiement pour corriger le problème d'écriture des logs de prod">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/DEPLOYMENT.md" beforeDir="false" afterPath="$PROJECT_DIR$/DEPLOYMENT.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -194,6 +193,9 @@
<path value="$PROJECT_DIR$/vendor/dompdf/php-font-lib" />
<path value="$PROJECT_DIR$/vendor/lexik/jwt-authentication-bundle" />
<path value="$PROJECT_DIR$/vendor/lcobucci/jwt" />
<path value="$PROJECT_DIR$/vendor/monolog/monolog" />
<path value="$PROJECT_DIR$/vendor/symfony/monolog-bundle" />
<path value="$PROJECT_DIR$/vendor/symfony/monolog-bridge" />
</include_path>
</component>
<component name="ProjectColorInfo">{
@@ -263,7 +265,7 @@
<workItem from="1768374298711" duration="12403000" />
<workItem from="1768460547451" duration="26946000" />
<workItem from="1768547023783" duration="11371000" />
<workItem from="1768894030675" duration="36043000" />
<workItem from="1768894030675" duration="49464000" />
</task>
<task id="LOCAL-00001" summary="feat : Ajout de pinia, création de la table weight et reception mise en place du système de step pour les receptions (WIP)">
<option name="closed" value="true" />
@@ -425,7 +427,47 @@
<option name="project" value="LOCAL" />
<updated>1769024603812</updated>
</task>
<option name="localTasksCounter" value="21" />
<task id="LOCAL-00021" summary="ci : ajout du script et de la doc déploiement">
<option name="closed" value="true" />
<created>1769026716634</created>
<option name="number" value="00021" />
<option name="presentableId" value="LOCAL-00021" />
<option name="project" value="LOCAL" />
<updated>1769026716634</updated>
</task>
<task id="LOCAL-00022" summary="fix : correction du path URI pour la création d'un poids dans une réception">
<option name="closed" value="true" />
<created>1769073690382</created>
<option name="number" value="00022" />
<option name="presentableId" value="LOCAL-00022" />
<option name="project" value="LOCAL" />
<updated>1769073690382</updated>
</task>
<task id="LOCAL-00023" summary="feat : Ajout du bundle Monolog pour la gestion des logs">
<option name="closed" value="true" />
<created>1769075990984</created>
<option name="number" value="00023" />
<option name="presentableId" value="LOCAL-00023" />
<option name="project" value="LOCAL" />
<updated>1769075990984</updated>
</task>
<task id="LOCAL-00024" summary="fix : affiche plus détail dans les logs en recette/prod">
<option name="closed" value="true" />
<created>1769077633390</created>
<option name="number" value="00024" />
<option name="presentableId" value="LOCAL-00024" />
<option name="project" value="LOCAL" />
<updated>1769077633390</updated>
</task>
<task id="LOCAL-00025" summary="fix : modification du script de déploiement pour corriger le problème d'écriture des logs de prod">
<option name="closed" value="true" />
<created>1769079030808</created>
<option name="number" value="00025" />
<option name="presentableId" value="LOCAL-00025" />
<option name="project" value="LOCAL" />
<updated>1769079030808</updated>
</task>
<option name="localTasksCounter" value="26" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
@@ -475,7 +517,6 @@
</option>
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="Feat : (WIP) Ajout de pinia, création de la table weight et reception mise en place du système de step pour les receptions" />
<MESSAGE value="Feat : Ajout de pinia, création de la table weight et reception mise en place du système de step pour les receptions (WIP)" />
<MESSAGE value="feat : Ajout de pinia, création de la table weight et reception mise en place du système de step pour les receptions (WIP)" />
<MESSAGE value="feat : Ajout de zod, création d'un composant de chargement loading-dots.vue et finalisation du flow d'une reception" />
@@ -496,7 +537,12 @@
<MESSAGE value="ci: auto tag + release artefact" />
<MESSAGE value="ci : auto tag + release artefact" />
<MESSAGE value="ci : fix release artefact" />
<option name="LAST_COMMIT_MESSAGE" value="ci : fix release artefact" />
<MESSAGE value="ci : ajout du script et de la doc déploiement" />
<MESSAGE value="fix : correction du path URI pour la création d'un poids dans une réception" />
<MESSAGE value="feat : Ajout du bundle Monolog pour la gestion des logs" />
<MESSAGE value="fix : affiche plus détail dans les logs en recette/prod" />
<MESSAGE value="fix : modification du script de déploiement pour corriger le problème d'écriture des logs de prod" />
<option name="LAST_COMMIT_MESSAGE" value="fix : modification du script de déploiement pour corriger le problème d'écriture des logs de prod" />
</component>
<component name="XSLT-Support.FileAssociations.UIState">
<expand />

View File

@@ -70,7 +70,7 @@
2. Attendre que la release Gitea soit publiée
3. Déployer la release
```bash
sudo DEPLOY_OWNER=malio /usr/local/bin/deploy-ferme v0.0.X
sudo DEPLOY_OWNER=malio DEPLOY_GROUP=www-data /usr/local/bin/deploy-ferme v0.0.X
```
### Vérifications

View File

@@ -83,7 +83,7 @@ Pour le modifier, il faut copier le contenu du deploy-release.sh dans le deploy-
### Livraison
Sur le serveur de recette, il suffit d'utiliser cette commande pour livrer
```bash
sudo DEPLOY_OWNER=malio /usr/local/bin/deploy-ferme vX.X.X
sudo DEPLOY_OWNER=malio DEPLOY_GROUP=www-data ./scripts/deploy-release.sh vX.Y.Z
```
## Commandes utiles
Pour restart le container
@@ -116,3 +116,7 @@ Sélectionner entity User, taper sont mdp, le copier et l'ajouter dans l'insert
INSERT INTO "user" (username, roles, password)
VALUES ('Mon user', '["ROLE_USER"]', 'Mon mdp hashé');
```
## Gestion des logs
Pour suivre les logs en temps réel :
* tail -f var/log/dev.log
* tail -f var/log/prod.log

View File

@@ -24,6 +24,7 @@
"symfony/flex": "^2",
"symfony/framework-bundle": "8.0.*",
"symfony/http-client": "8.0.*",
"symfony/monolog-bundle": "^4.0",
"symfony/property-access": "8.0.*",
"symfony/property-info": "8.0.*",
"symfony/runtime": "8.0.*",

261
composer.lock generated
View File

@@ -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": "f619208e7dd3272e671e7c2b139afa87",
"content-hash": "e122271fbb08b4c19c1fe6084f95aeab",
"packages": [
{
"name": "api-platform/doctrine-common",
@@ -2772,6 +2772,109 @@
},
"time": "2025-07-25T09:04:22+00:00"
},
{
"name": "monolog/monolog",
"version": "3.10.0",
"source": {
"type": "git",
"url": "https://github.com/Seldaek/monolog.git",
"reference": "b321dd6749f0bf7189444158a3ce785cc16d69b0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/b321dd6749f0bf7189444158a3ce785cc16d69b0",
"reference": "b321dd6749f0bf7189444158a3ce785cc16d69b0",
"shasum": ""
},
"require": {
"php": ">=8.1",
"psr/log": "^2.0 || ^3.0"
},
"provide": {
"psr/log-implementation": "3.0.0"
},
"require-dev": {
"aws/aws-sdk-php": "^3.0",
"doctrine/couchdb": "~1.0@dev",
"elasticsearch/elasticsearch": "^7 || ^8",
"ext-json": "*",
"graylog2/gelf-php": "^1.4.2 || ^2.0",
"guzzlehttp/guzzle": "^7.4.5",
"guzzlehttp/psr7": "^2.2",
"mongodb/mongodb": "^1.8 || ^2.0",
"php-amqplib/php-amqplib": "~2.4 || ^3",
"php-console/php-console": "^3.1.8",
"phpstan/phpstan": "^2",
"phpstan/phpstan-deprecation-rules": "^2",
"phpstan/phpstan-strict-rules": "^2",
"phpunit/phpunit": "^10.5.17 || ^11.0.7",
"predis/predis": "^1.1 || ^2",
"rollbar/rollbar": "^4.0",
"ruflin/elastica": "^7 || ^8",
"symfony/mailer": "^5.4 || ^6",
"symfony/mime": "^5.4 || ^6"
},
"suggest": {
"aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
"doctrine/couchdb": "Allow sending log messages to a CouchDB server",
"elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client",
"ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
"ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler",
"ext-mbstring": "Allow to work properly with unicode symbols",
"ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)",
"ext-openssl": "Required to send log messages using SSL",
"ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)",
"graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
"mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)",
"php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
"rollbar/rollbar": "Allow sending log messages to Rollbar",
"ruflin/elastica": "Allow sending log messages to an Elastic Search server"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.x-dev"
}
},
"autoload": {
"psr-4": {
"Monolog\\": "src/Monolog"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Jordi Boggiano",
"email": "j.boggiano@seld.be",
"homepage": "https://seld.be"
}
],
"description": "Sends your logs to files, sockets, inboxes, databases and various web services",
"homepage": "https://github.com/Seldaek/monolog",
"keywords": [
"log",
"logging",
"psr-3"
],
"support": {
"issues": "https://github.com/Seldaek/monolog/issues",
"source": "https://github.com/Seldaek/monolog/tree/3.10.0"
},
"funding": [
{
"url": "https://github.com/Seldaek",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/monolog/monolog",
"type": "tidelift"
}
],
"time": "2026-01-02T08:56:05+00:00"
},
{
"name": "nelmio/cors-bundle",
"version": "2.6.0",
@@ -5272,6 +5375,162 @@
],
"time": "2025-12-31T09:29:34+00:00"
},
{
"name": "symfony/monolog-bridge",
"version": "v8.0.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/monolog-bridge.git",
"reference": "6dd0793eb9ebcecb0b909a5571ac6e82867d7b20"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/monolog-bridge/zipball/6dd0793eb9ebcecb0b909a5571ac6e82867d7b20",
"reference": "6dd0793eb9ebcecb0b909a5571ac6e82867d7b20",
"shasum": ""
},
"require": {
"monolog/monolog": "^3",
"php": ">=8.4",
"symfony/http-kernel": "^7.4|^8.0",
"symfony/service-contracts": "^2.5|^3"
},
"require-dev": {
"symfony/console": "^7.4|^8.0",
"symfony/http-client": "^7.4|^8.0",
"symfony/mailer": "^7.4|^8.0",
"symfony/messenger": "^7.4|^8.0",
"symfony/mime": "^7.4|^8.0",
"symfony/security-core": "^7.4|^8.0",
"symfony/var-dumper": "^7.4|^8.0"
},
"type": "symfony-bridge",
"autoload": {
"psr-4": {
"Symfony\\Bridge\\Monolog\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Provides integration for Monolog with various Symfony components",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/monolog-bridge/tree/v8.0.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://github.com/nicolas-grekas",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2025-11-01T09:19:23+00:00"
},
{
"name": "symfony/monolog-bundle",
"version": "v4.0.1",
"source": {
"type": "git",
"url": "https://github.com/symfony/monolog-bundle.git",
"reference": "3b4ee2717ee56c5e1edb516140a175eb2a72bc66"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/monolog-bundle/zipball/3b4ee2717ee56c5e1edb516140a175eb2a72bc66",
"reference": "3b4ee2717ee56c5e1edb516140a175eb2a72bc66",
"shasum": ""
},
"require": {
"composer-runtime-api": "^2.0",
"monolog/monolog": "^3.5",
"php": ">=8.2",
"symfony/config": "^7.3 || ^8.0",
"symfony/dependency-injection": "^7.3 || ^8.0",
"symfony/http-kernel": "^7.3 || ^8.0",
"symfony/monolog-bridge": "^7.3 || ^8.0",
"symfony/polyfill-php84": "^1.30"
},
"require-dev": {
"phpunit/phpunit": "^11.5.41 || ^12.3",
"symfony/console": "^7.3 || ^8.0",
"symfony/yaml": "^7.3 || ^8.0"
},
"type": "symfony-bundle",
"autoload": {
"psr-4": {
"Symfony\\Bundle\\MonologBundle\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony MonologBundle",
"homepage": "https://symfony.com",
"keywords": [
"log",
"logging"
],
"support": {
"issues": "https://github.com/symfony/monolog-bundle/issues",
"source": "https://github.com/symfony/monolog-bundle/tree/v4.0.1"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://github.com/nicolas-grekas",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2025-12-08T08:00:13+00:00"
},
{
"name": "symfony/password-hasher",
"version": "v8.0.0",

View File

@@ -8,6 +8,7 @@ use Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle;
use Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle;
use Nelmio\CorsBundle\NelmioCorsBundle;
use Symfony\Bundle\FrameworkBundle\FrameworkBundle;
use Symfony\Bundle\MonologBundle\MonologBundle;
use Symfony\Bundle\SecurityBundle\SecurityBundle;
use Symfony\Bundle\TwigBundle\TwigBundle;
@@ -20,4 +21,5 @@ return [
NelmioCorsBundle::class => ['all' => true],
LexikJWTAuthenticationBundle::class => ['all' => true],
ApiPlatformBundle::class => ['all' => true],
MonologBundle::class => ['all' => true],
];

View File

@@ -0,0 +1,28 @@
monolog:
channels: [deprecation]
when@dev:
monolog:
handlers:
main:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
channels: ["!event"]
console:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine", "!console"]
when@prod:
monolog:
handlers:
main:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
channels: ["!deprecation"]
deprecation:
type: stream
channels: [deprecation]
path: "%kernel.logs_dir%/deprecations.log"

View File

@@ -1608,6 +1608,149 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
* ...<mixed>
* },
* }
* @psalm-type MonologConfig = array{
* use_microseconds?: scalar|null|Param, // Default: true
* channels?: list<scalar|null|Param>,
* handlers?: array<string, array{ // Default: []
* type: scalar|null|Param,
* id?: scalar|null|Param,
* enabled?: bool|Param, // Default: true
* priority?: scalar|null|Param, // Default: 0
* level?: scalar|null|Param, // Default: "DEBUG"
* bubble?: bool|Param, // Default: true
* interactive_only?: bool|Param, // Default: false
* app_name?: scalar|null|Param, // Default: null
* include_stacktraces?: bool|Param, // Default: false
* process_psr_3_messages?: array{
* enabled?: bool|null|Param, // Default: null
* date_format?: scalar|null|Param,
* remove_used_context_fields?: bool|Param,
* },
* path?: scalar|null|Param, // Default: "%kernel.logs_dir%/%kernel.environment%.log"
* file_permission?: scalar|null|Param, // Default: null
* use_locking?: bool|Param, // Default: false
* filename_format?: scalar|null|Param, // Default: "{filename}-{date}"
* date_format?: scalar|null|Param, // Default: "Y-m-d"
* ident?: scalar|null|Param, // Default: false
* logopts?: scalar|null|Param, // Default: 1
* facility?: scalar|null|Param, // Default: "user"
* max_files?: scalar|null|Param, // Default: 0
* action_level?: scalar|null|Param, // Default: "WARNING"
* activation_strategy?: scalar|null|Param, // Default: null
* stop_buffering?: bool|Param, // Default: true
* passthru_level?: scalar|null|Param, // Default: null
* excluded_http_codes?: list<array{ // Default: []
* code?: scalar|null|Param,
* urls?: list<scalar|null|Param>,
* }>,
* accepted_levels?: list<scalar|null|Param>,
* min_level?: scalar|null|Param, // Default: "DEBUG"
* max_level?: scalar|null|Param, // Default: "EMERGENCY"
* buffer_size?: scalar|null|Param, // Default: 0
* flush_on_overflow?: bool|Param, // Default: false
* handler?: scalar|null|Param,
* url?: scalar|null|Param,
* exchange?: scalar|null|Param,
* exchange_name?: scalar|null|Param, // Default: "log"
* channel?: scalar|null|Param, // Default: null
* bot_name?: scalar|null|Param, // Default: "Monolog"
* use_attachment?: scalar|null|Param, // Default: true
* use_short_attachment?: scalar|null|Param, // Default: false
* include_extra?: scalar|null|Param, // Default: false
* icon_emoji?: scalar|null|Param, // Default: null
* webhook_url?: scalar|null|Param,
* exclude_fields?: list<scalar|null|Param>,
* token?: scalar|null|Param,
* region?: scalar|null|Param,
* source?: scalar|null|Param,
* use_ssl?: bool|Param, // Default: true
* user?: mixed,
* title?: scalar|null|Param, // Default: null
* host?: scalar|null|Param, // Default: null
* port?: scalar|null|Param, // Default: 514
* config?: list<scalar|null|Param>,
* members?: list<scalar|null|Param>,
* connection_string?: scalar|null|Param,
* timeout?: scalar|null|Param,
* time?: scalar|null|Param, // Default: 60
* deduplication_level?: scalar|null|Param, // Default: 400
* store?: scalar|null|Param, // Default: null
* connection_timeout?: scalar|null|Param,
* persistent?: bool|Param,
* message_type?: scalar|null|Param, // Default: 0
* parse_mode?: scalar|null|Param, // Default: null
* disable_webpage_preview?: bool|null|Param, // Default: null
* disable_notification?: bool|null|Param, // Default: null
* split_long_messages?: bool|Param, // Default: false
* delay_between_messages?: bool|Param, // Default: false
* topic?: int|Param, // Default: null
* factor?: int|Param, // Default: 1
* tags?: list<scalar|null|Param>,
* console_formatter_options?: mixed, // Default: []
* formatter?: scalar|null|Param,
* nested?: bool|Param, // Default: false
* publisher?: string|array{
* id?: scalar|null|Param,
* hostname?: scalar|null|Param,
* port?: scalar|null|Param, // Default: 12201
* chunk_size?: scalar|null|Param, // Default: 1420
* encoder?: "json"|"compressed_json"|Param,
* },
* mongodb?: string|array{
* id?: scalar|null|Param, // ID of a MongoDB\Client service
* uri?: scalar|null|Param,
* username?: scalar|null|Param,
* password?: scalar|null|Param,
* database?: scalar|null|Param, // Default: "monolog"
* collection?: scalar|null|Param, // Default: "logs"
* },
* elasticsearch?: string|array{
* id?: scalar|null|Param,
* hosts?: list<scalar|null|Param>,
* host?: scalar|null|Param,
* port?: scalar|null|Param, // Default: 9200
* transport?: scalar|null|Param, // Default: "Http"
* user?: scalar|null|Param, // Default: null
* password?: scalar|null|Param, // Default: null
* },
* index?: scalar|null|Param, // Default: "monolog"
* document_type?: scalar|null|Param, // Default: "logs"
* ignore_error?: scalar|null|Param, // Default: false
* redis?: string|array{
* id?: scalar|null|Param,
* host?: scalar|null|Param,
* password?: scalar|null|Param, // Default: null
* port?: scalar|null|Param, // Default: 6379
* database?: scalar|null|Param, // Default: 0
* key_name?: scalar|null|Param, // Default: "monolog_redis"
* },
* predis?: string|array{
* id?: scalar|null|Param,
* host?: scalar|null|Param,
* },
* from_email?: scalar|null|Param,
* to_email?: list<scalar|null|Param>,
* subject?: scalar|null|Param,
* content_type?: scalar|null|Param, // Default: null
* headers?: list<scalar|null|Param>,
* mailer?: scalar|null|Param, // Default: null
* email_prototype?: string|array{
* id: scalar|null|Param,
* method?: scalar|null|Param, // Default: null
* },
* verbosity_levels?: array{
* VERBOSITY_QUIET?: scalar|null|Param, // Default: "ERROR"
* VERBOSITY_NORMAL?: scalar|null|Param, // Default: "WARNING"
* VERBOSITY_VERBOSE?: scalar|null|Param, // Default: "NOTICE"
* VERBOSITY_VERY_VERBOSE?: scalar|null|Param, // Default: "INFO"
* VERBOSITY_DEBUG?: scalar|null|Param, // Default: "DEBUG"
* },
* channels?: string|array{
* type?: scalar|null|Param,
* elements?: list<scalar|null|Param>,
* },
* }>,
* }
* @psalm-type ConfigType = array{
* imports?: ImportsConfig,
* parameters?: ParametersConfig,
@@ -1620,6 +1763,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
* nelmio_cors?: NelmioCorsConfig,
* lexik_jwt_authentication?: LexikJwtAuthenticationConfig,
* api_platform?: ApiPlatformConfig,
* monolog?: MonologConfig,
* "when@dev"?: array{
* imports?: ImportsConfig,
* parameters?: ParametersConfig,
@@ -1632,6 +1776,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
* nelmio_cors?: NelmioCorsConfig,
* lexik_jwt_authentication?: LexikJwtAuthenticationConfig,
* api_platform?: ApiPlatformConfig,
* monolog?: MonologConfig,
* },
* "when@prod"?: array{
* imports?: ImportsConfig,
@@ -1645,6 +1790,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
* nelmio_cors?: NelmioCorsConfig,
* lexik_jwt_authentication?: LexikJwtAuthenticationConfig,
* api_platform?: ApiPlatformConfig,
* monolog?: MonologConfig,
* },
* "when@test"?: array{
* imports?: ImportsConfig,
@@ -1658,6 +1804,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
* nelmio_cors?: NelmioCorsConfig,
* lexik_jwt_authentication?: LexikJwtAuthenticationConfig,
* api_platform?: ApiPlatformConfig,
* monolog?: MonologConfig,
* },
* ...<string, ExtensionType|array{ // extra keys must follow the when@%env% pattern or match an extension alias
* imports?: ImportsConfig,

View File

@@ -65,7 +65,7 @@ export const useWeighing = ({
})
} else {
await createWeight({
reception: `/receptions/${reception.value.id}`,
reception: `api/receptions/${reception.value.id}`,
type: mode,
dsd: baseDsd,
weight: baseWeight,

View File

@@ -101,6 +101,13 @@ copy-git-hook:
shell:
$(EXEC_PHP_INTERACTIVE) bash
shell-root:
$(EXEC_PHP_INTERACTIVE_ROOT) bash
# Suivi temps réel des logs dev
logs-dev:
$(EXEC_PHP_INTERACTIVE) sh -lc "tail -f var/log/dev.log"
# Force la version node
node-use:
bash -lc 'source "$$HOME/.nvm/nvm.sh" && nvm install && nvm use'

View File

@@ -1,36 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$ROOT_DIR"
BRANCH="develop"
for cmd in git php composer npm; do
if ! command -v "$cmd" >/dev/null 2>&1; then
echo "Missing required command: $cmd" >&2
exit 1
fi
done
echo "==> Pulling latest code ($BRANCH)"
git fetch origin "$BRANCH"
git checkout "$BRANCH"
git pull --ff-only origin "$BRANCH"
echo "==> Installing backend deps (prod)"
composer install --no-dev --optimize-autoloader
echo "==> Running DB migrations"
php bin/console doctrine:migrations:migrate --no-interaction --env=prod
echo "==> Warming Symfony cache (prod)"
php bin/console cache:clear --env=prod
php bin/console cache:warmup --env=prod
echo "==> Building frontend (static)"
cd "$ROOT_DIR/frontend"
npm ci
npm run generate
echo "==> Done."

View File

@@ -73,8 +73,14 @@ echo "Release ${TAG} deployed to ${DEPLOY_DIR}"
if [ -n "${DEPLOY_OWNER:-}" ]; then
DEPLOY_GROUP="${DEPLOY_GROUP:-www-data}"
chown -R "${DEPLOY_OWNER}:${DEPLOY_GROUP}" "$DEPLOY_DIR"
chmod -R g+rx,o+rx "$DEPLOY_DIR"
DEPLOY_PERMS_SCOPE="${DEPLOY_PERMS_SCOPE:-var}"
if [ "$DEPLOY_PERMS_SCOPE" = "all" ]; then
chown -R "${DEPLOY_OWNER}:${DEPLOY_GROUP}" "$DEPLOY_DIR"
chmod -R g+rx,o+rx "$DEPLOY_DIR"
elif [ -d "${DEPLOY_DIR}/var" ]; then
chown -R "${DEPLOY_OWNER}:${DEPLOY_GROUP}" "${DEPLOY_DIR}/var"
chmod -R g+rwX "${DEPLOY_DIR}/var"
fi
fi
if [ -f "${DEPLOY_DIR}/.env.local" ]; then

View File

@@ -145,6 +145,18 @@
".editorconfig"
]
},
"symfony/monolog-bundle": {
"version": "4.0",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "3.7",
"ref": "1b9efb10c54cb51c713a9391c9300ff8bceda459"
},
"files": [
"config/packages/monolog.yaml"
]
},
"symfony/property-info": {
"version": "8.0",
"recipe": {