Problem:
Dunglas Mercure just upgraded this week, and has completly change, it now use a caddy web serveur solution instead of a built-in web serveur, it seems to be very cool, but now, i can not configure my dunglas/mercure image anymore...
https://mercure.rocks/docs/UPGRADE
So the problem seems to be directly related to this update, because now, the dunglas/mercure image is built from a caddy web serveur image, and where before i could just configure my image like this:
mercure:
image: dunglas/mercure
environment:
- JWT_KEY=MySecret
- ALLOW_ANONYMOUS=1
- PUBLISH_ALLOWED_ORIGINS=http://localhost
- DEBUG=1
- CORS_ALLOWED_ORIGINS=http://localhost:8080
ports:
- 3000:80
Now it don't work anymore (Caddy is using his default caddyFile, which is set in the caddy web serveur image called by the dunglas/mercure image)
I did not succeed to configure caddy web serveur through mercure/dunglass image (configure jwt_key, cors etc...)
So i'm first wondering if there a way to configure this new image?
And then, if there's no way to configure it, i'll would like to know what is the purpose of this new USELESS mercure image if we can not configure it, and have to make our own with a correctly pre-configured caddy web server?
So, i have to apologize for my ignorance, while i'm still a noob on docker and docker compose, this update put me in panic.
Finally, i simply tried to bind a Caddyfile in the dunglass/mercure container, replacing the default file conf, and it worked!
So in my docker-compose file, mercure service is now:
And my Caddyfile:
If it can help someone!