-
-
Notifications
You must be signed in to change notification settings - Fork 496
[mercure-bundle] add support for Docker Compose #1007
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks for the PR 😍 How to test these changes in your application
Diff between recipe versionsIn order to help with the review stage, I'm in charge of computing the diff between the various versions of patched recipes. symfony/mercure-bundle0.1 vs 0.2diff --git a/symfony/mercure-bundle/0.1/config/packages/mercure.yaml b/symfony/mercure-bundle/0.2/config/packages/mercure.yaml
index d1947d1..17aaa0c 100644
--- a/symfony/mercure-bundle/0.1/config/packages/mercure.yaml
+++ b/symfony/mercure-bundle/0.2/config/packages/mercure.yaml
@@ -1,4 +1,5 @@
mercure:
+ enable_profiler: '%kernel.debug%'
hubs:
default:
url: '%env(MERCURE_PUBLISH_URL)%' 0.2 vs 0.3diff --git a/symfony/mercure-bundle/0.2/config/packages/mercure.yaml b/symfony/mercure-bundle/0.3/config/packages/mercure.yaml
index 17aaa0c..f2a7395 100644
--- a/symfony/mercure-bundle/0.2/config/packages/mercure.yaml
+++ b/symfony/mercure-bundle/0.3/config/packages/mercure.yaml
@@ -1,6 +1,8 @@
mercure:
- enable_profiler: '%kernel.debug%'
hubs:
default:
- url: '%env(MERCURE_PUBLISH_URL)%'
- jwt: '%env(MERCURE_JWT_TOKEN)%'
+ url: '%env(MERCURE_URL)%'
+ public_url: '%env(MERCURE_PUBLIC_URL)%'
+ jwt:
+ secret: '%env(MERCURE_JWT_SECRET)%'
+ publish: '*'
diff --git a/symfony/mercure-bundle/0.2/manifest.json b/symfony/mercure-bundle/0.3/manifest.json
index ba8f74d..cd7eac5 100644
--- a/symfony/mercure-bundle/0.2/manifest.json
+++ b/symfony/mercure-bundle/0.3/manifest.json
@@ -7,9 +7,41 @@
},
"env": {
"#1": "See https://symfony.com/doc/current/mercure.html#configuration",
- "MERCURE_PUBLISH_URL": "http://mercure/.well-known/mercure",
- "#2": "The default token is signed with the secret key: !ChangeMe!",
- "MERCURE_JWT_TOKEN": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZXJjdXJlIjp7InB1Ymxpc2giOltdfX0.Oo0yg7y4yMa1vr_bziltxuTCqb8JVHKxp-f_FwwOim0"
+ "#2": "The URL of the Mercure hub, used by the app to publish updates (can be a local URL)",
+ "MERCURE_URL": "https://example.com/.well-known/mercure",
+ "#3": "The public URL of the Mercure hub, used by the browser to connect",
+ "MERCURE_PUBLIC_URL": "https://example.com/.well-known/mercure",
+ "#4": "The secret used to sign the JWTs",
+ "MERCURE_JWT_SECRET": "!ChangeMe!"
+ },
+ "docker-compose": {
+ "docker-compose.yml": {
+ "services": [
+ "mercure:",
+ " image: dunglas/mercure",
+ " restart: unless-stopped",
+ " environment:",
+ " SERVER_NAME: ':80'",
+ " MERCURE_PUBLISHER_JWT_KEY: '!ChangeMe!'",
+ " MERCURE_SUBSCRIBER_JWT_KEY: '!ChangeMe!'",
+ " # 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",
+ " # Comment the following line to disable the development mode",
+ " command: /usr/bin/caddy run -config /etc/caddy/Caddyfile.dev",
+ " volumes:",
+ " - mercure_data:/data",
+ " - mercure_config:/config"
+ ],
+ "volumes": ["mercure_data:", "mercure_config:"]
+ },
+ "docker-compose.override.yml": {
+ "services": [
+ "mercure:",
+ " ports:",
+ " - \"80\""
+ ]
+ }
},
"aliases": ["mercure"]
} |
5c99753
to
8a4cf06
Compare
chalasr
approved these changes
Oct 12, 2021
nicolas-grekas
approved these changes
Oct 13, 2021
weaverryan
added a commit
to symfony/maker-bundle
that referenced
this pull request
Oct 17, 2021
This PR was merged into the 1.0-dev branch. Discussion ---------- Fix replacing default MERCURE_URL in tests The test failing seems to be caused by symfony/recipes#1007 Commits ------- 52c8fc3 Fix replacing default MERCURE_URL in tests
saylor-mik87786
added a commit
to saylor-mik87786/maker-bundle
that referenced
this pull request
Jun 3, 2025
This PR was merged into the 1.0-dev branch. Discussion ---------- Fix replacing default MERCURE_URL in tests The test failing seems to be caused by symfony/recipes#1007 Commits ------- 52c8fc31 Fix replacing default MERCURE_URL in tests
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The native support for Mercure in Symfony CLI has been removed. This PR adds support for Docker Compose instead.