Merge branch 'cicd' into 'develop'

fix: 🐛 use bedrock multistage

See merge request ldc-web/projets/regalette!32
This commit is contained in:
Noix 2026-10-30 16:58:12 +00:00
commit 5b6f979967
2 changed files with 46 additions and 22 deletions

View file

@ -1,22 +1,20 @@
include:
- project: "ldc-web/shared-ci"
ref: "main"
file: "security/composer.yml"
- project: "ldc-web/shared-ci"
ref: "main"
file: "build/composer-bedrock-8.3.yml"
- project: "ldc-web/shared-ci"
ref: "main"
file: "build/docker-bedrock.yml"
- project: "ldc-web/shared-ci"
ref: "main"
file: "test/test.yml"
- project: "ldc-web/shared-ci"
ref: "main"
file: "deploy/deploy.yml"
- project: 'ldc-web/shared-ci'
ref: 'main'
file: 'security/security.yml'
- project: 'ldc-web/shared-ci'
ref: 'main'
file: "build/docker-bedrock-multistage.yml"
- project: 'ldc-web/shared-ci'
ref: 'main'
file: 'test/test.yml'
- project: 'ldc-web/shared-ci'
ref: 'main'
file: 'deploy/deploy.yml'
stages:
- security
- build
- test
- deploy
- security
- build
- test
- deploy

View file

@ -1,7 +1,33 @@
ARG PHP_8_5_TAG=latest
FROM composer:2.11 AS vendor
ARG GITLAB_USER
ARG GITLAB_PASSWORD
ARG APP_ACF_USER
ARG APP_ACF_PWD
COPY composer.json composer.json
COPY composer.lock composer.lock
RUN composer config gitlab-token.lab.s-web.fr ${GITLAB_USER} ${GITLAB_PASSWORD}
RUN composer config http-basic.connect.advancedcustomfields.com ${APP_ACF_USER} ${APP_ACF_PWD}
RUN composer install \
--no-dev \
--optimize-autoloader \
--classmap-authoritative
ARG PHP_8_5_TAG=latest
FROM registry.s-web.fr/ldc-web/projets/ldc-web-images-docker/uwil-production-8.5:${PHP_8_5_TAG}
COPY --chown=www-data:www-data . /app/srcs
ARG USER=www-data
COPY --chown=${USER}:${USER} . /app/srcs
COPY --from=vendor --chown=${USER}:${USER} /app/vendor/ /app/srcs/vendor/
COPY --from=vendor --chown=${USER}:${USER} /app/public/wp/ /app/srcs/public/wp/
COPY --from=vendor --chown=${USER}:${USER} /app/public/app/mu-plugins/ /app/srcs/public/app/mu-plugins/
COPY --from=vendor --chown=${USER}:${USER} /app/public/app/plugins/ /app/srcs/public/app/plugins/
COPY --from=vendor --chown=${USER}:${USER} /app/public/app/themes/regalette-theme/ /app/srcs/public/app/themes/regalette-theme/
USER root
RUN chmod -R 755 /app/srcs/public/app/uploads
USER www-data
USER ${USER}