Open utterances-bot opened 1 year ago
where write this code?
SYMFONY_ROOT="/var/www/html/apps" MERCURE_PATH="$SYMFONY_ROOT/bin/vendor/mercure"
MERCURE_PUBLISHER_JWT_KEY="$(cat $SYMFONY_ROOT/config/jwt/public.pem)" \ MERCURE_PUBLISHER_JWT_ALG="RS256" \ MERCURE_SUBSCRIBER_JWT_KEY="$(cat $SYMFONY_ROOT/config/jwt/public.pem)" \ MERCURE_SUBSCRIBER_JWT_ALG="RS256" \ $MERCURE_PATH run -config $SYMFONY_ROOT/Caddyfile
and how create this tls /etc/ssl/dev.crt /etc/ssl/dev.pem
Thanks for the great tutorial and the additional help! With your help had changed the last line of the bash script to $MERCURE_PATH run --config $SYMFONY_ROOT/Caddyfile with the two dashes. Now it works like a charm.
@yasranwar: Although it's a bit late: The file is being used in the supervisord config. And you can create the pem file with let's encrypt. I used the fullchain.pem and privkey.pem files in the Caddyfile and cert.pem in the Apache config.
Thank you very much for this article, it has saved me quite a few hours of trial and error.
I had to leave a comment here: your post was a life saver! Thanks!
Real-time Communications via Server-Sent Events: Mercure, Apache, PHP, and Symfony in Production | Mo Ismailzai
Mercure is an open protocol built on top of Server Side Events and helps facilitate real-time communications in web applications. I discuss how I integrated Mercure into an existing Apache-based Symfony application.
https://www.ismailzai.com/blog/symfony-mercure-apache