diff --git a/compose.override.yaml b/compose.override.yaml index ae167cac1..e6e24b68f 100644 --- a/compose.override.yaml +++ b/compose.override.yaml @@ -36,5 +36,5 @@ services: ###> symfony/mercure-bundle ### mercure: ports: - - "127.0.0.1:8080:80" + - "127.0.0.1:8043:443" ###< symfony/mercure-bundle ### diff --git a/compose.yaml b/compose.yaml index 1675a7cff..6a427aaa0 100644 --- a/compose.yaml +++ b/compose.yaml @@ -61,7 +61,7 @@ services: MERCURE_SUBSCRIBER_JWT_KEY: '!ChangeThisMercureHubJWTSecretKey!' # Set the URL of your Symfony project (without trailing slash!) as value of the cors_origins directive MERCURE_EXTRA_DIRECTIVES: | - cors_origins http://127.0.0.1:8000 + cors_origins http://chill-bundles.wip https://chill-bundles.wip # Comment the following line to disable the development mode command: /usr/bin/caddy run --config /etc/caddy/dev.Caddyfile healthcheck: diff --git a/config/routes/chill_assets_dev.yaml b/config/routes/chill_assets_dev.yaml index ea4a9c424..b53088132 100644 --- a/config/routes/chill_assets_dev.yaml +++ b/config/routes/chill_assets_dev.yaml @@ -17,3 +17,8 @@ when@dev: defaults: template: '@ChillMain/Dev/dev.assets.test2.html.twig' + dev_mercure: + path: /_dev/mercure + controller: Symfony\Bundle\FrameworkBundle\Controller\TemplateController + defaults: + template: '@ChillMain/Dev/dev.mercure.html.twig' diff --git a/resources/dev.Caddyfile b/resources/dev.Caddyfile new file mode 100644 index 000000000..436d81ae9 --- /dev/null +++ b/resources/dev.Caddyfile @@ -0,0 +1,20 @@ +{ + # Désactive les redirections automatiques HTTP -> HTTPS + # auto_https off + # Désactive le port 80 par défaut + # default_bind :8080 +} + +localhost:8043 { + mercure { + # Publisher JWT key + publisher_jwt !ChangeThisMercureHubJWTSecretKey! + # Subscriber JWT key + subscriber_jwt !ChangeThisMercureHubJWTSecretKey! + cors_origins http://chill-bundles.wip https://chill-bundles.wip + ui + demo + } + + respond "Not Found" 404 +} diff --git a/src/Bundle/ChillMainBundle/Resources/views/Dev/dev.mercure.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Dev/dev.mercure.html.twig new file mode 100644 index 000000000..d6f10c015 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/views/Dev/dev.mercure.html.twig @@ -0,0 +1,21 @@ + + + Test mercure + + +
+ + + +
+ + +