From afcf242f759180f6a787e99b4d62ca36b2ab092f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Gangloff?= Date: Sun, 11 Aug 2024 15:53:36 +0200 Subject: [PATCH] fix: remove Mercure server --- .dockerignore | 34 ++++++++++++++++++++++++++++++++++ compose.override.yaml | 4 ---- compose.prod.yaml | 2 -- compose.yaml | 13 ------------- frankenphp/Caddyfile | 24 ------------------------ 5 files changed, 34 insertions(+), 43 deletions(-) create mode 100644 .dockerignore diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..dc5a875 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,34 @@ +**/*.log +**/*.md +**/*.php~ +**/*.dist.php +**/*.dist +**/*.cache +**/._* +**/.dockerignore +**/.DS_Store +**/.git/ +**/.gitattributes +**/.gitignore +**/.gitmodules +**/compose.*.yaml +**/compose.*.yml +**/compose.yaml +**/compose.yml +**/docker-compose.*.yaml +**/docker-compose.*.yml +**/docker-compose.yaml +**/docker-compose.yml +**/Dockerfile +**/Thumbs.db +.github/ +docs/ +public/bundles/ +tests/ +var/ +vendor/ +.editorconfig +.env.*.local +.env.local +.env.local.php +.env.test diff --git a/compose.override.yaml b/compose.override.yaml index 3821899..dca2286 100644 --- a/compose.override.yaml +++ b/compose.override.yaml @@ -12,7 +12,6 @@ services: # from the bind-mount for better performance by enabling the next line: #- /app/vendor environment: - MERCURE_EXTRA_DIRECTIVES: demo # See https://xdebug.org/docs/all_settings#mode XDEBUG_MODE: "${XDEBUG_MODE:-off}" extra_hosts: @@ -20,9 +19,6 @@ services: - host.docker.internal:host-gateway tty: true -###> symfony/mercure-bundle ### -###< symfony/mercure-bundle ### - ###> doctrine/doctrine-bundle ### database: ports: diff --git a/compose.prod.yaml b/compose.prod.yaml index f0db05d..d49a419 100644 --- a/compose.prod.yaml +++ b/compose.prod.yaml @@ -6,5 +6,3 @@ services: target: frankenphp_prod environment: APP_SECRET: ${APP_SECRET} - MERCURE_PUBLISHER_JWT_KEY: ${CADDY_MERCURE_JWT_SECRET} - MERCURE_SUBSCRIBER_JWT_KEY: ${CADDY_MERCURE_JWT_SECRET} diff --git a/compose.yaml b/compose.yaml index f53e21f..564654c 100644 --- a/compose.yaml +++ b/compose.yaml @@ -4,14 +4,8 @@ services: restart: unless-stopped environment: SERVER_NAME: ${SERVER_NAME:-localhost}, php:80 - MERCURE_PUBLISHER_JWT_KEY: ${CADDY_MERCURE_JWT_SECRET:-!ChangeThisMercureHubJWTSecretKey!} - MERCURE_SUBSCRIBER_JWT_KEY: ${CADDY_MERCURE_JWT_SECRET:-!ChangeThisMercureHubJWTSecretKey!} # Run "composer require symfony/orm-pack" to install and configure Doctrine ORM DATABASE_URL: postgresql://${POSTGRES_USER:-app}:${POSTGRES_PASSWORD:-!ChangeMe!}@database:5432/${POSTGRES_DB:-app}?serverVersion=${POSTGRES_VERSION:-15}&charset=${POSTGRES_CHARSET:-utf8} - # Run "composer require symfony/mercure-bundle" to install and configure the Mercure integration - MERCURE_URL: ${CADDY_MERCURE_URL:-http://php/.well-known/mercure} - MERCURE_PUBLIC_URL: ${CADDY_MERCURE_PUBLIC_URL:-https://${SERVER_NAME:-localhost}/.well-known/mercure} - MERCURE_JWT_SECRET: ${CADDY_MERCURE_JWT_SECRET:-!ChangeThisMercureHubJWTSecretKey!} # The two next lines can be removed after initial installation SYMFONY_VERSION: ${SYMFONY_VERSION:-} STABILITY: ${STABILITY:-stable} @@ -32,10 +26,6 @@ services: published: ${HTTP3_PORT:-443} protocol: udp -# Mercure is installed as a Caddy module, prevent the Flex recipe from installing another service -###> symfony/mercure-bundle ### -###< symfony/mercure-bundle ### - ###> doctrine/doctrine-bundle ### database: image: postgres:${POSTGRES_VERSION:-16}-alpine @@ -58,9 +48,6 @@ services: volumes: caddy_data: caddy_config: -###> symfony/mercure-bundle ### -###< symfony/mercure-bundle ### - ###> doctrine/doctrine-bundle ### database_data: ###< doctrine/doctrine-bundle ### diff --git a/frankenphp/Caddyfile b/frankenphp/Caddyfile index b8bb57d..9bbff76 100644 --- a/frankenphp/Caddyfile +++ b/frankenphp/Caddyfile @@ -9,33 +9,9 @@ {$CADDY_EXTRA_CONFIG} {$SERVER_NAME:localhost} { - log { - # Redact the authorization query parameter that can be set by Mercure - format filter { - request>uri query { - replace authorization REDACTED - } - } - } - root * /app/public encode zstd br gzip - mercure { - # Transport to use (default to Bolt) - transport_url {$MERCURE_TRANSPORT_URL:bolt:///data/mercure.db} - # Publisher JWT key - publisher_jwt {env.MERCURE_PUBLISHER_JWT_KEY} {env.MERCURE_PUBLISHER_JWT_ALG} - # Subscriber JWT key - subscriber_jwt {env.MERCURE_SUBSCRIBER_JWT_KEY} {env.MERCURE_SUBSCRIBER_JWT_ALG} - # Allow anonymous subscribers (double-check that it's what you want) - anonymous - # Enable the subscription API (double-check that it's what you want) - subscriptions - # Extra directives - {$MERCURE_EXTRA_DIRECTIVES} - } - vulcain {$CADDY_SERVER_EXTRA_DIRECTIVES}