Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5938d33c89 | |||
| d95ab85415 | |||
| cc39e46bfd |
@@ -27,7 +27,7 @@ DATABASE_URL="mysql://root:password@database:3306/app?serverVersion=10.6.19.2-Ma
|
|||||||
# Popular Movies and TV Shows section.
|
# Popular Movies and TV Shows section.
|
||||||
#TMDB_API=
|
#TMDB_API=
|
||||||
|
|
||||||
REAL_DEBRID_KEY="QYYBR7OSQ4VEFKWASDEZ2B4VO67KHUJY6IWOT7HHA7ATXO7QCYDQ"
|
REAL_DEBRID_KEY=""
|
||||||
TMDB_API=eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiI0ZTJjYjJhOGUzOGJhNjdiNjVhOGU1NGM0ZWI1MzhmOCIsIm5iZiI6MTczNzkyNjA0NC41NjQsInN1YiI6IjY3OTZhNTljYzdiMDFiNzJjNzIzZWM5YiIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.e8DbNe9qrSBC1y-ANRv-VWBAtls-ZS2r7aNCiI68mpw
|
TMDB_API=eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiI0ZTJjYjJhOGUzOGJhNjdiNjVhOGU1NGM0ZWI1MzhmOCIsIm5iZiI6MTczNzkyNjA0NC41NjQsInN1YiI6IjY3OTZhNTljYzdiMDFiNzJjNzIzZWM5YiIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.e8DbNe9qrSBC1y-ANRv-VWBAtls-ZS2r7aNCiI68mpw
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,13 @@ services:
|
|||||||
- '8006:80'
|
- '8006:80'
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
|
volumes:
|
||||||
|
- /mnt/media/downloads/movies:/var/download/movies
|
||||||
|
- /mnt/media/downloads/tvshows:/var/download/tvshows
|
||||||
|
environment:
|
||||||
|
TZ: America/Chicago
|
||||||
|
MERCURE_PUBLISHER_JWT_KEY: '!ChangeThisMercureHubJWTSecretKey!'
|
||||||
|
MERCURE_SUBSCRIBER_JWT_KEY: '!ChangeThisMercureHubJWTSecretKey!'
|
||||||
depends_on:
|
depends_on:
|
||||||
database:
|
database:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
@@ -27,6 +34,8 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- /mnt/media/downloads/movies:/var/download/movies
|
- /mnt/media/downloads/movies:/var/download/movies
|
||||||
- /mnt/media/downloads/tvshows:/var/download/tvshows
|
- /mnt/media/downloads/tvshows:/var/download/tvshows
|
||||||
|
environment:
|
||||||
|
TZ: America/Chicago
|
||||||
command: -vvv
|
command: -vvv
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
@@ -43,35 +52,17 @@ services:
|
|||||||
scheduler:
|
scheduler:
|
||||||
image: code.caldwell.digital/home/torsearch-scheduler:latest
|
image: code.caldwell.digital/home/torsearch-scheduler:latest
|
||||||
volumes:
|
volumes:
|
||||||
- ./downloads:/var/download
|
- /mnt/media/downloads/movies:/var/download/movies
|
||||||
|
- /mnt/media/downloads/tvshows:/var/download/tvshows
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
|
environment:
|
||||||
|
TZ: America/Chicago
|
||||||
restart: always
|
restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
app:
|
app:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
||||||
# This container facilitates viewing the progress of downloads
|
|
||||||
# in realtime. It also handles sending alerts and notifications.
|
|
||||||
# The MERCURE_PUBLISHER_JWT key & MERCURE_SUBSCRIBER_JWT_KEY should
|
|
||||||
# match the MERCURE_JWT_SECRET environment variable.
|
|
||||||
mercure:
|
|
||||||
image: dunglas/mercure
|
|
||||||
restart: unless-stopped
|
|
||||||
ports:
|
|
||||||
- "3001:80"
|
|
||||||
environment:
|
|
||||||
SERVER_NAME: ':80'
|
|
||||||
MERCURE_PUBLISHER_JWT_KEY: '!ChangeThisMercureHubJWTSecretKey!'
|
|
||||||
MERCURE_SUBSCRIBER_JWT_KEY: '!ChangeThisMercureHubJWTSecretKey!'
|
|
||||||
MERCURE_EXTRA_DIRECTIVES: |
|
|
||||||
cors_origins *
|
|
||||||
anonymous
|
|
||||||
command: /usr/bin/caddy run --config /etc/caddy/dev.Caddyfile
|
|
||||||
volumes:
|
|
||||||
- mercure_data:/data
|
|
||||||
- mercure_config:/config
|
|
||||||
|
|
||||||
database:
|
database:
|
||||||
image: mariadb:10.11.2
|
image: mariadb:10.11.2
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -2,17 +2,13 @@
|
|||||||
|
|
||||||
namespace App\Monitor\Framework\Controller;
|
namespace App\Monitor\Framework\Controller;
|
||||||
|
|
||||||
use App\Download\Action\Input\DeleteDownloadInput;
|
|
||||||
use App\Monitor\Action\Handler\AddMonitorHandler;
|
use App\Monitor\Action\Handler\AddMonitorHandler;
|
||||||
use App\Monitor\Action\Handler\DeleteMonitorHandler;
|
use App\Monitor\Action\Handler\DeleteMonitorHandler;
|
||||||
use App\Monitor\Action\Input\AddMonitorInput;
|
use App\Monitor\Action\Input\AddMonitorInput;
|
||||||
use App\Monitor\Action\Input\DeleteMonitorInput;
|
use App\Monitor\Action\Input\DeleteMonitorInput;
|
||||||
use App\Util\Broadcaster;
|
use App\Util\Broadcaster;
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||||
use Symfony\Bundle\SecurityBundle\Security;
|
|
||||||
use Symfony\Component\DependencyInjection\Attribute\Autowire;
|
|
||||||
use Symfony\Component\Mercure\HubInterface;
|
use Symfony\Component\Mercure\HubInterface;
|
||||||
use Symfony\Component\Mercure\Update;
|
|
||||||
use Symfony\Component\Routing\Attribute\Route;
|
use Symfony\Component\Routing\Attribute\Route;
|
||||||
|
|
||||||
class ApiController extends AbstractController
|
class ApiController extends AbstractController
|
||||||
@@ -46,19 +42,9 @@ class ApiController extends AbstractController
|
|||||||
public function deleteMonitor(
|
public function deleteMonitor(
|
||||||
DeleteMonitorInput $input,
|
DeleteMonitorInput $input,
|
||||||
DeleteMonitorHandler $handler,
|
DeleteMonitorHandler $handler,
|
||||||
HubInterface $hub,
|
|
||||||
) {
|
) {
|
||||||
$response = $handler->handle($input->toCommand());
|
$response = $handler->handle($input->toCommand());
|
||||||
|
|
||||||
$hub->publish(new Update(
|
|
||||||
'alerts',
|
|
||||||
$this->renderer->render('broadcast/Alert.stream.html.twig', [
|
|
||||||
'alert_id' => uniqid(),
|
|
||||||
'title' => 'Success',
|
|
||||||
'message' => "New monitor added for {$response->monitor->getTitle()}",
|
|
||||||
])
|
|
||||||
));
|
|
||||||
|
|
||||||
return $this->json([
|
return $this->json([
|
||||||
'status' => 200,
|
'status' => 200,
|
||||||
'message' => $response
|
'message' => $response
|
||||||
|
|||||||
@@ -17,13 +17,16 @@ use Psr\Log\LoggerInterface;
|
|||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||||
use Symfony\Bundle\SecurityBundle\Security;
|
use Symfony\Bundle\SecurityBundle\Security;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
use Symfony\Component\HttpFoundation\RequestStack;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\HttpKernel\KernelInterface;
|
use Symfony\Component\HttpKernel\KernelInterface;
|
||||||
use Symfony\Component\Routing\Attribute\Route;
|
use Symfony\Component\Routing\Attribute\Route;
|
||||||
|
|
||||||
class RegistrationController extends AbstractController
|
class RegistrationController extends AbstractController
|
||||||
{
|
{
|
||||||
public function __construct(private readonly RegisterUserHandler $registerUserHandler)
|
public function __construct(private readonly RegisterUserHandler $registerUserHandler,
|
||||||
|
private readonly RequestStack $requestStack
|
||||||
|
)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,6 +74,7 @@ class RegistrationController extends AbstractController
|
|||||||
));
|
));
|
||||||
|
|
||||||
$security->login($user->user);
|
$security->login($user->user);
|
||||||
|
$this->requestStack->getCurrentRequest()->getSession()->set('mercure_alert_topic', 'alerts_' . uniqid());
|
||||||
|
|
||||||
return $this->redirectToRoute('app_index');
|
return $this->redirectToRoute('app_index');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user