问题描述
我对此有点困惑,所以我需要你的帮助 在我的 docker-compose 中,我想我已经配置了所有想要的东西。 但问题是当我试图通过 symfony 在 mercure 中发布一些东西时,他不想这样做 但是当我尝试不通过 symfony(with js) 它工作 如果有人有想法会很酷
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 ###
谢谢大家
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)