diff --git a/.env.example b/.env.example index 445b2c84..960e127e 100644 --- a/.env.example +++ b/.env.example @@ -37,6 +37,7 @@ SMTP_SECURE= MAIL_FROM_NAME= MAIL_FROM_ADDRESS= MAIL_ADMIN= +MAIL_CONTACT_RGPD= # ADMIN SECURE LDCWEB_API_TOKEN= diff --git a/.gitignore b/.gitignore index 9a5557dc..424ae367 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,7 @@ public/app/themes/*/ public/app/upgrade public/app/uploads/* !public/app/uploads/.gitkeep +!public/app/uploads/export/.gitkeep public/app/cache/* public/app/webp-express public/app/themes/.htaccess diff --git a/Dockerfile b/Dockerfile index 6f22683c..ab9af419 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ -FROM registry.s-web.fr/ldc-web/projets/ldc-web-images-docker/ldcweb-production-8.2:latest +FROM registry.s-web.fr/ldc-web/projets/ldc-web-images-docker/ldcweb-production-8.2:170625-080812 COPY --chown=www-data:www-data . /app/srcs USER root RUN chmod -R 755 /app/srcs/public/app/uploads -USER www-data \ No newline at end of file +USER www-data diff --git a/composer.json b/composer.json index 72c4d223..4f44e5d0 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,6 @@ "roots/wordpress": "6.7.2", "roots/wp-config": "1.0.0", "roots/wp-password-bcrypt": "1.2.0", - "uwil/ldc-theme": "^1.1", "ldc/ldccrmv4client": "^4.0", "wpackagist-plugin/breadcrumb-navxt": "^7.4", "wpengine/advanced-custom-fields-pro": "^6.3", @@ -37,7 +36,8 @@ "wpackagist-plugin/duplicate-post": "^4.5", "wpackagist-plugin/webp-express": "^0.25.9", "wpackagist-plugin/relevanssi": "^4.24", - "wpackagist-plugin/wordpress-seo": "^24.8" + "wpackagist-plugin/wordpress-seo": "^24.8", + "uwil/ldc-theme": "^1.2" }, "require-dev": { "roave/security-advisories": "dev-latest", diff --git a/composer.lock b/composer.lock index d1cd1696..b2194779 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "18e8af366c29fa60c54eb4cef3391e63", + "content-hash": "f011c5ac850c3daeef55c48183820047", "packages": [ { "name": "composer/installers", @@ -1893,16 +1893,16 @@ }, { "name": "uwil/ldc-theme", - "version": "1.1.2", + "version": "1.2.5", "source": { "type": "git", "url": "git@lab.s-web.fr:ldc-web/projets/ldc-theme.git", - "reference": "28fe02953ab0518597d1d26d9a7a22ab619c4b44" + "reference": "fd4f40681afe43550691cec28695fecf99978beb" }, "dist": { "type": "zip", - "url": "https://lab.s-web.fr/api/v4/projects/232/packages/composer/archives/uwil/ldc-theme.zip?sha=28fe02953ab0518597d1d26d9a7a22ab619c4b44", - "reference": "28fe02953ab0518597d1d26d9a7a22ab619c4b44", + "url": "https://lab.s-web.fr/api/v4/projects/232/packages/composer/archives/uwil/ldc-theme.zip?sha=fd4f40681afe43550691cec28695fecf99978beb", + "reference": "fd4f40681afe43550691cec28695fecf99978beb", "shasum": "" }, "type": "wordpress-theme", @@ -2628,6 +2628,6 @@ "platform": { "php": ">=8.1" }, - "platform-dev": [], - "plugin-api-version": "2.3.0" + "platform-dev": {}, + "plugin-api-version": "2.6.0" } diff --git a/config/custom.php b/config/custom.php index e8b98044..f98b0454 100644 --- a/config/custom.php +++ b/config/custom.php @@ -31,6 +31,7 @@ Config::define('SMTP_SECURE', env('SMTP_SECURE')); Config::define('MAIL_FROM_NAME', env('MAIL_FROM_NAME')); Config::define('MAIL_FROM_ADDRESS', env('MAIL_FROM_ADDRESS')); Config::define('MAIL_ADMIN', env('MAIL_ADMIN')); +Config::define('MAIL_CONTACT_RGPD', env('MAIL_CONTACT_RGPD')); /** * MATOMO ANALYTICS diff --git a/manifest.yaml b/manifest.yaml index 093f6770..a43e205a 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -30,6 +30,7 @@ data: MAIL_FROM_NAME: "${APP_MAIL_FROM_NAME}" MAIL_FROM_ADDRESS: "${APP_MAIL_FROM_ADDRESS}" MAIL_ADMIN: "${APP_MAIL_ADMIN}" + MAIL_CONTACT_RGPD: "${APP_MAIL_CONTACT_RGPD}" MATOMO_SITE_ID: "${APP_MATOMO_SITE_ID}" RECAPTCHA_V3_PUBLIC: "${APP_RECAPTCHA_V3_PUBLIC}" RECAPTCHA_V3_SECRET: "${APP_RECAPTCHA_V3_SECRET}" @@ -100,7 +101,7 @@ spec: app: ${CI_PROJECT_PATH_SLUG}-app ports: - port: 80 - targetPort: 443 + targetPort: 80 --- apiVersion: traefik.io/v1alpha1 @@ -119,10 +120,22 @@ spec: port: 80 middlewares: - name: redirect-no-www-to-www + - name: redirect-ldc-rgpd-to-rgpd tls: secretName: ${CRT_TLS_NAME} --- +# Redirect with domain replacement +apiVersion: traefik.io/v1alpha1 +kind: Middleware +metadata: + name: redirect-ldc-rgpd-to-rgpd +spec: + redirectRegex: + regex: ^https://${REDIRECT}${APP_DOMAIN}/rgpd/(professionnels|salaries|consommateurs)(/(en|de))? + replacement: https://rgpd.ldc.fr/fr/${1} + permanent: true +--- apiVersion: batch/v1 kind: CronJob metadata: @@ -250,3 +263,44 @@ spec: fsGroup: 33 fsGroupChangePolicy: "OnRootMismatch" restartPolicy: OnFailure +--- +apiVersion: batch/v1 +kind: CronJob +metadata: + name: ${CI_PROJECT_PATH_SLUG}-cronjob-publish-posts +spec: + schedule: "*/5 * * * *" + concurrencyPolicy: Forbid + jobTemplate: + spec: + template: + spec: + affinity: + podAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + - labelSelector: + matchExpressions: + - key: app + operator: In + values: + - ${CI_PROJECT_PATH_SLUG}-app + topologyKey: "kubernetes.io/hostname" + namespaces: [$KUBE_NAMESPACE] + containers: + - name: ${CI_PROJECT_PATH_SLUG}-scheduled + image: $IMAGE_TAG + imagePullPolicy: IfNotPresent + command: ["sh", "-c"] + args: + - curl -sf https://${REDIRECT}${APP_DOMAIN}/wp/wp-cron.php?doing_wp_cron + envFrom: + - configMapRef: + name: ${CI_PROJECT_PATH_SLUG}-config-map + imagePullSecrets: + - name: docker-registry-credentials + securityContext: + runAsUser: 33 + runAsGroup: 33 + fsGroup: 33 + fsGroupChangePolicy: "OnRootMismatch" + restartPolicy: OnFailure diff --git a/public/export/.gitkeep b/public/export/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/public/news/24_01_15/img/header.jpg b/public/news/24_01_15/img/header.jpg new file mode 100644 index 00000000..dfcd14c9 Binary files /dev/null and b/public/news/24_01_15/img/header.jpg differ diff --git a/public/news/24_06_24/img/header.jpg b/public/news/24_06_24/img/header.jpg new file mode 100644 index 00000000..e47921ce Binary files /dev/null and b/public/news/24_06_24/img/header.jpg differ diff --git a/public/news/24_12_26/img/header.jpg b/public/news/24_12_26/img/header.jpg new file mode 100644 index 00000000..8d8d6781 Binary files /dev/null and b/public/news/24_12_26/img/header.jpg differ diff --git a/public/news/25_06_18/img/header.jpg b/public/news/25_06_18/img/header.jpg new file mode 100644 index 00000000..43054200 Binary files /dev/null and b/public/news/25_06_18/img/header.jpg differ diff --git a/public/unsubdr.php b/public/unsubdr.php new file mode 100644 index 00000000..652882d7 --- /dev/null +++ b/public/unsubdr.php @@ -0,0 +1,12 @@ +query("DELETE FROM wp_digitalrecruiter_jobalert WHERE email = '$email'"); +} + +header('Location: https://www.ldc.fr'); +exit; diff --git a/public/unsubscribe.php b/public/unsubscribe.php new file mode 100644 index 00000000..a9b49ad4 --- /dev/null +++ b/public/unsubscribe.php @@ -0,0 +1,186 @@ +getApiError()->label : $e->getMessage(), + $e->getMessage(), + $hashcode + )); + } +} + +?> + + + + +
+ + + +
+ Vous êtes désinscris de la newsletter LDC.
+En espérant vous revoir bientôt !
+Une erreur est survenue.
+Veuillez réessayer ultérieurement.
+