i'm little confused about this so i want your help in my docker-compose i think i have configured all want it must be. But the thing is when im trying publish somthing in mercure via symfony he dont want to do it but when i try without passing via symfony(with js) it work If some one has an idea it will be cool
version: '3.8'
services:
web:
build:
context: .
target: Symfony_PHP
container_name: web_symfony
ports:
- 90:90
- 943:943
restart: always
volumes:
- ./portailcse/:/var/www/app/
- symfony-cache:/var/www/app/var/cache
- symfony-log:/var/www/app/var/log
- symfony-vendor:/var/www/app/vendor
networks:
- dev
depends_on:
- db
mercure:
image: dunglas/mercure
container_name: mercure
restart: unless-stopped
environment:
# Uncomment the following line to disable HTTPS
SERVER_NAME: ':90'
MERCURE_PUBLISHER_JWT_KEY: 'testjwt'
MERCURE_SUBSCRIBER_JWT_KEY: 'testjwt'
# PUBLISH_ALLOWED_ORIGINS: '*'
# CORS_ALLOWED_ORIGINS: '*'
# ALLOW_ANONYMOUS: 1
# DEBUG: 'debug'
# Uncomment the following line to enable the development mode
command: /usr/bin/caddy run -config /etc/caddy/Caddyfile.dev
ports:
- 7001:90
volumes:
- caddy_data:/data
- caddy_config:/config
networks:
- dev
networks:
dev:
volumes:
symfony-vendor:
symfony-log:
symfony-cache:
caddy_data:
caddy_config:
###> symfony/mercure-bundle ###
# See https://symfony.com/doc/current/mercure.html#configuration
# The URL of the Mercure hub, used by the app to publish updates (can be a local URL)
MERCURE_URL=http://mercure:7001/.well-known/mercure
# The public URL of the Mercure hub, used by the browser to connect
MERCURE_PUBLIC_URL=http://mercure:7001/.well-known/mercure
# The secret used to sign the JWTs
MERCURE_JWT_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXJjdXJlIjp7InB1Ymxpc2giOlsiKiJdLCJzdWJzY3JpYmUiOlsiKiJdLCJwYXlsb2FkIjp7InJlbW90ZUFkZHIiOiIxMjcuMC4wLjEifX19.y6WSZvqaNkya67gRr2ta9R4fnPAv9-7EmPhQvfz6GJA
###< symfony/mercure-bundle ###
thanks you all