diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 14c39d9ff..a2efca96b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,6 +14,7 @@ env: DOCKER_TAG: ${{ github.sha }} IMAGE_REGISTRY: ghcr.io/${{ github.repository_owner }} VERIFY_SSL: "false" + SENTRY_RELEASE: ${{ github.sha }} jobs: build_keycloak: diff --git a/databox/api/Dockerfile b/databox/api/Dockerfile index 3a802288a..f4f389672 100644 --- a/databox/api/Dockerfile +++ b/databox/api/Dockerfile @@ -28,6 +28,10 @@ RUN apk add --no-cache \ imagick \ && apk del build-essentials +ADD https://letsencrypt.org/certs/staging/letsencrypt-stg-root-x1.pem /usr/local/share/ca-certificates/letsencrypt-root-ca.pem +RUN chmod 644 /usr/local/share/ca-certificates/letsencrypt-root-ca.pem \ + && update-ca-certificates + # Warm up composer cache for faster builds COPY docker/caching/composer.* ./ RUN composer install --prefer-dist --no-dev --no-progress --classmap-authoritative --no-interaction --no-scripts \ @@ -41,9 +45,8 @@ RUN mkdir -p var/cache var/logs var/sessions \ && composer clear-cache \ && chown -R app: . -ADD https://letsencrypt.org/certs/staging/letsencrypt-stg-root-x1.pem /usr/local/share/ca-certificates/letsencrypt-root-ca.pem -RUN chmod 644 /usr/local/share/ca-certificates/letsencrypt-root-ca.pem \ - && update-ca-certificates +ARG SENTRY_RELEASE +ENV SENTRY_RELEASE=${SENTRY_RELEASE} ENTRYPOINT ["/srv/app/docker/php-entrypoint.sh"] diff --git a/databox/api/config/packages/alchemy_core.yaml b/databox/api/config/packages/alchemy_core.yaml index 4dd916c26..a434a0138 100644 --- a/databox/api/config/packages/alchemy_core.yaml +++ b/databox/api/config/packages/alchemy_core.yaml @@ -2,4 +2,3 @@ alchemy_core: app_name: databox app_url: '%env(DATABOX_API_URL)%' healthcheck: ~ - sentry: ~ diff --git a/docker-compose.yml b/docker-compose.yml index b44d81736..7b5180728 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -97,6 +97,7 @@ services: args: BASE_TAG: ${DOCKER_TAG} REGISTRY_NAMESPACE: ${REGISTRY_NAMESPACE} + SENTRY_RELEASE: ${SENTRY_RELEASE} networks: - internal depends_on: diff --git a/expose/api/Dockerfile b/expose/api/Dockerfile index 3e7b992b6..4bb4f4049 100644 --- a/expose/api/Dockerfile +++ b/expose/api/Dockerfile @@ -2,6 +2,10 @@ ARG BASE_TAG=latest ARG REGISTRY_NAMESPACE FROM ${REGISTRY_NAMESPACE}php-fpm-base:${BASE_TAG} AS api-php +ADD https://letsencrypt.org/certs/staging/letsencrypt-stg-root-x1.pem /usr/local/share/ca-certificates/letsencrypt-root-ca.pem +RUN chmod 644 /usr/local/share/ca-certificates/letsencrypt-root-ca.pem \ + && update-ca-certificates + # Warm up composer cache for faster builds COPY docker/caching/composer.* ./ RUN composer install --prefer-dist --no-dev --no-progress --classmap-authoritative --no-interaction --no-scripts \ @@ -15,9 +19,8 @@ RUN mkdir -p var/cache var/logs var/sessions \ && composer clear-cache \ && chown -R app: . -ADD https://letsencrypt.org/certs/staging/letsencrypt-stg-root-x1.pem /usr/local/share/ca-certificates/letsencrypt-root-ca.pem -RUN chmod 644 /usr/local/share/ca-certificates/letsencrypt-root-ca.pem \ - && update-ca-certificates +ARG SENTRY_RELEASE +ENV SENTRY_RELEASE=${SENTRY_RELEASE} ENTRYPOINT ["/srv/app/docker/php-entrypoint.sh"] diff --git a/expose/api/config/packages/alchemy_core.yaml b/expose/api/config/packages/alchemy_core.yaml index 0373528cf..617b9d377 100644 --- a/expose/api/config/packages/alchemy_core.yaml +++ b/expose/api/config/packages/alchemy_core.yaml @@ -2,4 +2,3 @@ alchemy_core: app_name: expose app_url: '%env(EXPOSE_API_URL)%' healthcheck: ~ - sentry: ~ diff --git a/lib/php/core-bundle/DependencyInjection/AlchemyCoreExtension.php b/lib/php/core-bundle/DependencyInjection/AlchemyCoreExtension.php index f68b8087b..1d112332e 100644 --- a/lib/php/core-bundle/DependencyInjection/AlchemyCoreExtension.php +++ b/lib/php/core-bundle/DependencyInjection/AlchemyCoreExtension.php @@ -52,7 +52,8 @@ public function load(array $configs, ContainerBuilder $container): void $this->loadHealthCheckers($container); } - if ($config['sentry']['enabled']) { + $bundles = $container->getParameter('kernel.bundles'); + if (isset($bundles['SentryBundle'])) { $loader->load('sentry.yaml'); $this->loadSentry($container); } @@ -72,14 +73,11 @@ private function loadHealthCheckers(ContainerBuilder $container): void private function loadSentry(ContainerBuilder $container): void { - $bundles = $container->getParameter('kernel.bundles'); - if (isset($bundles['SentryBundle'])) { - $def = new Definition(PsrLogMessageProcessor::class); - $def->addTag('monolog.processor', [ - 'handler' =>'sentry', - ]); - $container->setDefinition(PsrLogMessageProcessor::class, $def); - } + $def = new Definition(PsrLogMessageProcessor::class); + $def->addTag('monolog.processor', [ + 'handler' =>'sentry', + ]); + $container->setDefinition(PsrLogMessageProcessor::class, $def); } private function loadFixtures(ContainerBuilder $container, LoaderInterface $loader): void diff --git a/lib/php/core-bundle/DependencyInjection/Configuration.php b/lib/php/core-bundle/DependencyInjection/Configuration.php index 64a904808..098994fb7 100644 --- a/lib/php/core-bundle/DependencyInjection/Configuration.php +++ b/lib/php/core-bundle/DependencyInjection/Configuration.php @@ -25,11 +25,6 @@ public function getConfigTreeBuilder(): TreeBuilder ->children() ->end() ->end() - ->arrayNode('sentry') - ->canBeEnabled() - ->children() - ->end() - ->end() ->end() ; diff --git a/lib/php/core-bundle/README.md b/lib/php/core-bundle/README.md index 988a0ef38..17747525e 100644 --- a/lib/php/core-bundle/README.md +++ b/lib/php/core-bundle/README.md @@ -15,7 +15,6 @@ Enable the feature: # config/packages/alchemy_core.yml alchemy_core: healthcheck: ~ - sentry: ~ ``` Add route: diff --git a/lib/php/core-bundle/Resources/config/monolog/prod.yaml b/lib/php/core-bundle/Resources/config/monolog/prod.yaml index 6e17bb27e..93077fcc5 100644 --- a/lib/php/core-bundle/Resources/config/monolog/prod.yaml +++ b/lib/php/core-bundle/Resources/config/monolog/prod.yaml @@ -1,11 +1,5 @@ monolog: handlers: - sentry: - type: fingers_crossed - action_level: error - handler: sentry_nested - excluded_http_codes: [ 405, 401, 403, 404, 400 ] - buffer_size: 5 # main: # type: fingers_crossed # action_level: error diff --git a/notify/api/Dockerfile b/notify/api/Dockerfile index 74edb862b..10adbc6dc 100644 --- a/notify/api/Dockerfile +++ b/notify/api/Dockerfile @@ -2,6 +2,10 @@ ARG BASE_TAG=latest ARG REGISTRY_NAMESPACE FROM ${REGISTRY_NAMESPACE}php-fpm-base:${BASE_TAG} AS api-php +ADD https://letsencrypt.org/certs/staging/letsencrypt-stg-root-x1.pem /usr/local/share/ca-certificates/letsencrypt-root-ca.pem +RUN chmod 644 /usr/local/share/ca-certificates/letsencrypt-root-ca.pem \ + && update-ca-certificates + # Warm up composer cache for faster builds COPY docker/caching/composer.* ./ RUN composer install --prefer-dist --no-dev --no-progress --classmap-authoritative --no-interaction --no-scripts \ @@ -15,9 +19,8 @@ RUN mkdir -p var/cache var/logs var/sessions \ && composer clear-cache \ && chown -R app: . -ADD https://letsencrypt.org/certs/staging/letsencrypt-stg-root-x1.pem /usr/local/share/ca-certificates/letsencrypt-root-ca.pem -RUN chmod 644 /usr/local/share/ca-certificates/letsencrypt-root-ca.pem \ - && update-ca-certificates +ARG SENTRY_RELEASE +ENV SENTRY_RELEASE=${SENTRY_RELEASE} ENTRYPOINT ["/srv/app/docker/php-entrypoint.sh"] diff --git a/notify/api/config/packages/alchemy_core.yaml b/notify/api/config/packages/alchemy_core.yaml index 939195948..3e6a74cb1 100644 --- a/notify/api/config/packages/alchemy_core.yaml +++ b/notify/api/config/packages/alchemy_core.yaml @@ -1,4 +1,3 @@ alchemy_core: app_name: notify healthcheck: ~ - sentry: ~ diff --git a/uploader/api/Dockerfile b/uploader/api/Dockerfile index 409164071..029914883 100644 --- a/uploader/api/Dockerfile +++ b/uploader/api/Dockerfile @@ -4,6 +4,10 @@ FROM ${REGISTRY_NAMESPACE}php-fpm-base:${BASE_TAG} AS api-php RUN printf "\nrequest_terminate_timeout = 600\n" >> /usr/local/etc/php-fpm.d/large-upload.conf +ADD https://letsencrypt.org/certs/staging/letsencrypt-stg-root-x1.pem /usr/local/share/ca-certificates/letsencrypt-root-ca.pem +RUN chmod 644 /usr/local/share/ca-certificates/letsencrypt-root-ca.pem \ + && update-ca-certificates + # Warm up composer cache for faster builds COPY docker/caching/composer.* ./ RUN composer install --prefer-dist --no-dev --no-progress --classmap-authoritative --no-interaction --no-scripts \ @@ -17,9 +21,8 @@ RUN mkdir -p var/cache var/logs var/sessions \ && composer clear-cache \ && chown -R app: . -ADD https://letsencrypt.org/certs/staging/letsencrypt-stg-root-x1.pem /usr/local/share/ca-certificates/letsencrypt-root-ca.pem -RUN chmod 644 /usr/local/share/ca-certificates/letsencrypt-root-ca.pem \ - && update-ca-certificates +ARG SENTRY_RELEASE +ENV SENTRY_RELEASE=${SENTRY_RELEASE} ENTRYPOINT ["/srv/app/docker/php-entrypoint.sh"] diff --git a/uploader/api/config/packages/alchemy_core.yaml b/uploader/api/config/packages/alchemy_core.yaml index ed8aedcef..0e3e3d02f 100644 --- a/uploader/api/config/packages/alchemy_core.yaml +++ b/uploader/api/config/packages/alchemy_core.yaml @@ -2,4 +2,3 @@ alchemy_core: app_name: uploader app_url: '%env(UPLOADER_API_URL)%' healthcheck: ~ - sentry: ~