Compare commits
1 Commits
feat/monit
...
feature/up
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
81fc713149 |
@@ -108,6 +108,9 @@ RUN composer install --no-cache --prefer-dist --no-dev --no-autoloader --no-scri
|
|||||||
FROM node:22-alpine AS node_build
|
FROM node:22-alpine AS node_build
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --link package.json package-lock.json ./
|
COPY --link package.json package-lock.json ./
|
||||||
|
COPY --from=composer_deps /app/vendor/symfony/ux-live-component/assets ./vendor/symfony/ux-live-component/assets
|
||||||
|
COPY --from=composer_deps /app/vendor/symfony/ux-react/assets ./vendor/symfony/ux-react/assets
|
||||||
|
COPY --from=composer_deps /app/vendor/symfony/ux-turbo/assets ./vendor/symfony/ux-turbo/assets
|
||||||
RUN npm install
|
RUN npm install
|
||||||
COPY --link assets ./assets
|
COPY --link assets ./assets
|
||||||
COPY --link webpack.config.js ./
|
COPY --link webpack.config.js ./
|
||||||
|
|||||||
@@ -14,14 +14,14 @@
|
|||||||
chapterId: chapter.id
|
chapterId: chapter.id
|
||||||
}
|
}
|
||||||
}">
|
}">
|
||||||
<template v-if="chapter.isVolumeGroup && chapter.volumeChapterCount > 1">
|
<template v-if="chapter.isVolumeGroup">
|
||||||
Chapitres {{ chapter.volumeChaptersRange }}
|
{{ chapter.volumeChapterCount > 1 ? 'Chapitres ' : 'Chapitre ' }}{{ chapter.volumeChaptersRange }}
|
||||||
</template>
|
</template>
|
||||||
<template v-else>{{ chapter.title || 'Sans titre' }}</template>
|
<template v-else>{{ chapter.title || 'Sans titre' }}</template>
|
||||||
</router-link>
|
</router-link>
|
||||||
<span v-else class="text-gray-500 dark:text-gray-400">
|
<span v-else class="text-gray-500 dark:text-gray-400">
|
||||||
<template v-if="chapter.isVolumeGroup && chapter.volumeChapterCount > 1">
|
<template v-if="chapter.isVolumeGroup">
|
||||||
Chapitres {{ chapter.volumeChaptersRange }}
|
{{ chapter.volumeChapterCount > 1 ? 'Chapitres ' : 'Chapitre ' }}{{ chapter.volumeChaptersRange }}
|
||||||
</template>
|
</template>
|
||||||
<template v-else>{{ chapter.title || 'Sans titre' }}</template>
|
<template v-else>{{ chapter.title || 'Sans titre' }}</template>
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -42,6 +42,8 @@ when@test:
|
|||||||
when@prod:
|
when@prod:
|
||||||
doctrine:
|
doctrine:
|
||||||
orm:
|
orm:
|
||||||
|
auto_generate_proxy_classes: false
|
||||||
|
proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies'
|
||||||
query_cache_driver:
|
query_cache_driver:
|
||||||
type: pool
|
type: pool
|
||||||
pool: doctrine.system_cache_pool
|
pool: doctrine.system_cache_pool
|
||||||
|
|||||||
@@ -53,13 +53,6 @@ if [ "$1" = 'frankenphp' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Vider le cache prod stale avant le démarrage des workers FrankenPHP.
|
|
||||||
# Sans ça, les workers chargent l'ancien cache du volume Docker et crashent
|
|
||||||
# en boucle si les classes du cache ne correspondent plus à la version déployée.
|
|
||||||
if [ "$APP_ENV" = "prod" ]; then
|
|
||||||
rm -rf var/cache/prod
|
|
||||||
fi
|
|
||||||
|
|
||||||
setfacl -R -m u:www-data:rwX -m u:"$(whoami)":rwX var
|
setfacl -R -m u:www-data:rwX -m u:"$(whoami)":rwX var
|
||||||
setfacl -dR -m u:www-data:rwX -m u:"$(whoami)":rwX var
|
setfacl -dR -m u:www-data:rwX -m u:"$(whoami)":rwX var
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
worker {
|
worker {
|
||||||
file ./public/index.php
|
file ./public/index.php
|
||||||
num 2
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,36 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
declare(strict_types=1);
|
|
||||||
|
|
||||||
namespace App\Command;
|
|
||||||
|
|
||||||
use App\Domain\Manga\Application\Command\CheckMonitoredMangas;
|
|
||||||
use Symfony\Component\Console\Attribute\AsCommand;
|
|
||||||
use Symfony\Component\Console\Command\Command;
|
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
|
||||||
use Symfony\Component\Messenger\MessageBusInterface;
|
|
||||||
|
|
||||||
#[AsCommand(
|
|
||||||
name: 'app:monitoring:run',
|
|
||||||
description: 'Déclenche immédiatement la vérification des mangas monitorés (sans attendre le scheduler)',
|
|
||||||
)]
|
|
||||||
class RunMonitoringCommand extends Command
|
|
||||||
{
|
|
||||||
public function __construct(
|
|
||||||
private readonly MessageBusInterface $commandBus,
|
|
||||||
) {
|
|
||||||
parent::__construct();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function execute(InputInterface $input, OutputInterface $output): int
|
|
||||||
{
|
|
||||||
$output->writeln('Déclenchement du monitoring des mangas...');
|
|
||||||
|
|
||||||
$this->commandBus->dispatch(new CheckMonitoredMangas());
|
|
||||||
|
|
||||||
$output->writeln('<info>Vérification lancée. Les nouveaux chapitres détectés seront scrappés via le worker commands.</info>');
|
|
||||||
|
|
||||||
return Command::SUCCESS;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Domain\Manga\Infrastructure\CommandHandler;
|
|
||||||
|
|
||||||
use App\Domain\Manga\Application\Command\CheckMonitoredMangas;
|
|
||||||
use App\Domain\Manga\Application\CommandHandler\CheckMonitoredMangasHandler;
|
|
||||||
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
|
|
||||||
|
|
||||||
#[AsMessageHandler]
|
|
||||||
readonly class SymfonyCheckMonitoredMangasHandler
|
|
||||||
{
|
|
||||||
public function __construct(
|
|
||||||
private CheckMonitoredMangasHandler $handler,
|
|
||||||
) {
|
|
||||||
}
|
|
||||||
|
|
||||||
public function __invoke(CheckMonitoredMangas $command): void
|
|
||||||
{
|
|
||||||
$this->handler->handle($command);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user