diff --git a/DOCUMENTATION/content/introduction/index.md b/DOCUMENTATION/content/introduction/index.md index 87a3fb3e..562402a2 100644 --- a/DOCUMENTATION/content/introduction/index.md +++ b/DOCUMENTATION/content/introduction/index.md @@ -192,6 +192,7 @@ That's it! enjoy :) - PostGIS *(Database extender for PostgreSQL. It adds support for geographic objects allowing location queries to be run in SQL)* - Blackfire *(Empowers all PHP developers and IT/Ops to continuously verify and improve their app's performance)* - Laravel Echo *(Bring the power of WebSockets to your Laravel applications)* + - Mercure *(Server-sent events)* - Phalcon *(A PHP web framework based on the model–view–controller pattern)* - Minio *(Cloud storage server released under Apache License v2, compatible with Amazon S3)* - AWS EB CLI *(CLI that helps you deploy and manage your AWS Elastic Beanstalk applications and environments)* diff --git a/docker-compose.yml b/docker-compose.yml index f9025f28..45791f82 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -744,6 +744,24 @@ services: networks: - backend +### Mercure ############################################# + mercure: + build: ./mercure + ports: + - "${MERCURE_NODE_HOST_HTTP_PORT}:80" + - "${MERCURE_NODE_HOST_HTTPS_PORT}:443" + privileged: true + environment: + - MERCURE_PUBLISHER_JWT_KEY=${MERCURE_PUBLISHER_JWT_KEY} + - MERCURE_SUBSCRIBER_JWT_KEY=${MERCURE_SUBSCRIBER_JWT_KEY} + - DEBUG=${MERCURE_DEBUG} + - SERVER_NAME=${MERCURE_SERVER_NAME} + - MERCURE_EXTRA_DIRECTIVES=cors_allowed_origins *\npublish_allowed_origins http://localhost:${MERCURE_NODE_HOST_HTTP_PORT} https://localhost:${MERCURE_NODE_HOST_HTTP_PORT} + hostname: laradock-mercure + networks: + - frontend + - backend + ### Cassandra ############################################ cassandra: build: ./cassandra diff --git a/env-example b/env-example index 6520f28d..0585bfda 100644 --- a/env-example +++ b/env-example @@ -414,6 +414,15 @@ RABBITMQ_MANAGEMENT_HTTPS_HOST_PORT=15671 RABBITMQ_DEFAULT_USER=guest RABBITMQ_DEFAULT_PASS=guest +### MERCURE ############################################## + +MERCURE_NODE_HOST_HTTP_PORT=1337 +MERCURE_NODE_HOST_HTTPS_PORT=1338 +MERCURE_PUBLISHER_JWT_KEY=secret +MERCURE_SUBSCRIBER_JWT_KEY=another_secret +MERCURE_DEBUG=debug +MERCURE_SERVER_NAME=:80 + ### MEILISEARCH ########################################### MEILISEARCH_HOST_PORT=7700 diff --git a/mercure/Dockerfile b/mercure/Dockerfile new file mode 100644 index 00000000..0ce140a9 --- /dev/null +++ b/mercure/Dockerfile @@ -0,0 +1,5 @@ +FROM dunglas/mercure + +LABEL maintainer="Kévin Dunglas " + +EXPOSE 80 443