mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-02 14:07:43 +00:00
First basic configuration for mercure
This commit is contained in:
parent
c5e6122d2c
commit
41896b1dd4
13
.env
13
.env
@ -16,9 +16,6 @@ APP_ENV=prod
|
|||||||
APP_SECRET=!ChangeMeInAppEnv!
|
APP_SECRET=!ChangeMeInAppEnv!
|
||||||
###< symfony/framework-bundle ###
|
###< symfony/framework-bundle ###
|
||||||
|
|
||||||
## Wopi server for editing documents online
|
|
||||||
EDITOR_SERVER=http://collabora:9980
|
|
||||||
|
|
||||||
# must be manually set in .env.local
|
# must be manually set in .env.local
|
||||||
# ADMIN_PASSWORD=
|
# ADMIN_PASSWORD=
|
||||||
|
|
||||||
@ -92,3 +89,13 @@ REDIS_URL=redis://${REDIS_HOST}:${REDIS_PORT}
|
|||||||
###> symfony/ovh-cloud-notifier ###
|
###> symfony/ovh-cloud-notifier ###
|
||||||
# OVHCLOUD_DSN=ovhcloud://APPLICATION_KEY:APPLICATION_SECRET@default?consumer_key=CONSUMER_KEY&service_name=SERVICE_NAME
|
# OVHCLOUD_DSN=ovhcloud://APPLICATION_KEY:APPLICATION_SECRET@default?consumer_key=CONSUMER_KEY&service_name=SERVICE_NAME
|
||||||
###< symfony/ovh-cloud-notifier ###
|
###< symfony/ovh-cloud-notifier ###
|
||||||
|
|
||||||
|
###> 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=https://example.com/.well-known/mercure
|
||||||
|
# The public URL of the Mercure hub, used by the browser to connect
|
||||||
|
MERCURE_PUBLIC_URL=https://example.com/.well-known/mercure
|
||||||
|
# The secret used to sign the JWTs
|
||||||
|
MERCURE_JWT_SECRET="!ChangeThisMercureHubJWTSecretKey!"
|
||||||
|
###< symfony/mercure-bundle ###
|
||||||
|
@ -32,3 +32,9 @@ services:
|
|||||||
hostname: my-rabbit
|
hostname: my-rabbit
|
||||||
volumes:
|
volumes:
|
||||||
- ./docker/rabbitmq/data:/var/lib/rabbitmq
|
- ./docker/rabbitmq/data:/var/lib/rabbitmq
|
||||||
|
|
||||||
|
###> symfony/mercure-bundle ###
|
||||||
|
mercure:
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:8080:80"
|
||||||
|
###< symfony/mercure-bundle ###
|
||||||
|
31
compose.yaml
31
compose.yaml
@ -50,7 +50,36 @@ services:
|
|||||||
timeout: 30s
|
timeout: 30s
|
||||||
retries: 3
|
retries: 3
|
||||||
|
|
||||||
|
###> symfony/mercure-bundle ###
|
||||||
|
mercure:
|
||||||
|
image: dunglas/mercure
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
# Uncomment the following line to disable HTTPS,
|
||||||
|
#SERVER_NAME: ':80'
|
||||||
|
MERCURE_PUBLISHER_JWT_KEY: '!ChangeThisMercureHubJWTSecretKey!'
|
||||||
|
MERCURE_SUBSCRIBER_JWT_KEY: '!ChangeThisMercureHubJWTSecretKey!'
|
||||||
|
# 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/dev.Caddyfile
|
||||||
|
healthcheck:
|
||||||
|
test: [ "CMD", "curl", "-f", "https://localhost/healthz" ]
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
start_period: 60s
|
||||||
|
volumes:
|
||||||
|
- mercure_data:/data
|
||||||
|
- mercure_config:/config
|
||||||
|
###< symfony/mercure-bundle ###
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
###> doctrine/doctrine-bundle ###
|
###> doctrine/doctrine-bundle ###
|
||||||
database_data:
|
database_data:
|
||||||
###< doctrine/doctrine-bundle ###
|
###< doctrine/doctrine-bundle ###
|
||||||
|
|
||||||
|
###> symfony/mercure-bundle ###
|
||||||
|
mercure_data:
|
||||||
|
mercure_config:
|
||||||
|
###< symfony/mercure-bundle ###
|
||||||
|
@ -55,6 +55,7 @@
|
|||||||
"symfony/http-foundation": "^5.4",
|
"symfony/http-foundation": "^5.4",
|
||||||
"symfony/intl": "^5.4",
|
"symfony/intl": "^5.4",
|
||||||
"symfony/mailer": "^5.4",
|
"symfony/mailer": "^5.4",
|
||||||
|
"symfony/mercure-bundle": "^0.3.9",
|
||||||
"symfony/messenger": "^5.4",
|
"symfony/messenger": "^5.4",
|
||||||
"symfony/mime": "^5.4",
|
"symfony/mime": "^5.4",
|
||||||
"symfony/monolog-bundle": "^3.5",
|
"symfony/monolog-bundle": "^3.5",
|
||||||
|
@ -38,4 +38,5 @@ return [
|
|||||||
Chill\TicketBundle\ChillTicketBundle::class => ['all' => true],
|
Chill\TicketBundle\ChillTicketBundle::class => ['all' => true],
|
||||||
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
|
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
|
||||||
Symfony\UX\Translator\UxTranslatorBundle::class => ['all' => true],
|
Symfony\UX\Translator\UxTranslatorBundle::class => ['all' => true],
|
||||||
|
Symfony\Bundle\MercureBundle\MercureBundle::class => ['all' => true],
|
||||||
];
|
];
|
||||||
|
8
config/packages/mercure.yaml
Normal file
8
config/packages/mercure.yaml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
mercure:
|
||||||
|
hubs:
|
||||||
|
default:
|
||||||
|
url: '%env(MERCURE_URL)%'
|
||||||
|
public_url: '%env(MERCURE_PUBLIC_URL)%'
|
||||||
|
jwt:
|
||||||
|
secret: '%env(MERCURE_JWT_SECRET)%'
|
||||||
|
publish: '*'
|
@ -11,6 +11,7 @@
|
|||||||
"@hotwired/stimulus": "^3.0.0",
|
"@hotwired/stimulus": "^3.0.0",
|
||||||
"@luminateone/eslint-baseline": "^1.0.9",
|
"@luminateone/eslint-baseline": "^1.0.9",
|
||||||
"@symfony/stimulus-bridge": "^3.2.0",
|
"@symfony/stimulus-bridge": "^3.2.0",
|
||||||
|
"@symfony/ux-translator": "file:vendor/symfony/ux-translator/assets",
|
||||||
"@symfony/webpack-encore": "^4.1.0",
|
"@symfony/webpack-encore": "^4.1.0",
|
||||||
"@tsconfig/node20": "^20.1.4",
|
"@tsconfig/node20": "^20.1.4",
|
||||||
"@types/dompurify": "^3.0.5",
|
"@types/dompurify": "^3.0.5",
|
||||||
|
12
symfony.lock
12
symfony.lock
@ -281,6 +281,18 @@
|
|||||||
"ref": "fadbfe33303a76e25cb63401050439aa9b1a9c7f"
|
"ref": "fadbfe33303a76e25cb63401050439aa9b1a9c7f"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"symfony/mercure-bundle": {
|
||||||
|
"version": "0.3",
|
||||||
|
"recipe": {
|
||||||
|
"repo": "github.com/symfony/recipes",
|
||||||
|
"branch": "main",
|
||||||
|
"version": "0.3",
|
||||||
|
"ref": "528285147494380298f8f991ee8c47abebaf79db"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"config/packages/mercure.yaml"
|
||||||
|
]
|
||||||
|
},
|
||||||
"symfony/messenger": {
|
"symfony/messenger": {
|
||||||
"version": "5.4",
|
"version": "5.4",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user