From bdff3496acd92fc0c6deddd57a90c309388d3b3e Mon Sep 17 00:00:00 2001 From: Vincent BRIDIER Date: Wed, 23 Oct 2024 14:22:24 +0200 Subject: [PATCH 1/3] fix: Remove hreef FIXME on list-page.blade.php --- resources/views/fo/partials/commitments/list-pages.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/fo/partials/commitments/list-pages.blade.php b/resources/views/fo/partials/commitments/list-pages.blade.php index 15de9b7b..86ed835f 100644 --- a/resources/views/fo/partials/commitments/list-pages.blade.php +++ b/resources/views/fo/partials/commitments/list-pages.blade.php @@ -78,7 +78,7 @@ @if (isset($showBtn) && $showBtn)
- {{ str(__('découvrir nos engagements'))->ucFirst() }}
@endif From f1f354b61973114bd04087564df329c173a1a6e2 Mon Sep 17 00:00:00 2001 From: Vincent BRIDIER Date: Wed, 23 Oct 2024 14:22:50 +0200 Subject: [PATCH 2/3] fix: Fix typo on club customer info form --- .../club/pages/customers/partials/customer-info-form.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/club/pages/customers/partials/customer-info-form.blade.php b/resources/views/club/pages/customers/partials/customer-info-form.blade.php index 1a484d2a..078acd11 100644 --- a/resources/views/club/pages/customers/partials/customer-info-form.blade.php +++ b/resources/views/club/pages/customers/partials/customer-info-form.blade.php @@ -8,7 +8,7 @@ ]; @endphp
- {{ __('Mes informations personelles') }} + {{ __('Mes informations personnelles') }} @include('club.pages.customers.partials.customer-fields') From f5a65fff9b4447a8d61bb8864ad61b1dde1b09a4 Mon Sep 17 00:00:00 2001 From: Vincent BRIDIER Date: Wed, 23 Oct 2024 14:23:44 +0200 Subject: [PATCH 3/3] feat: Update CICD config for docker multistage build --- .gitlab-ci.yml | 40 ++++++++++++++++++++-------------------- Dockerfile | 44 ++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 62 insertions(+), 22 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6c3e4aff..25935031 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,23 +1,23 @@ include: - - project: "ldc-web/shared-ci" - ref: "main" - file: "lint/lint.yml" - - project: "ldc-web/shared-ci" - ref: "main" - file: "security/security.yml" - - project: "ldc-web/shared-ci" - ref: "main" - file: "build/build.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: "lint/lint.yml" +- project: "ldc-web/shared-ci" + ref: "main" + file: "security/security.yml" +- project: "ldc-web/shared-ci" + ref: "main" + file: "build/docker-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: - - lint - - security - - build - - test - - deploy +- lint +- security +- build +- test +- deploy diff --git a/Dockerfile b/Dockerfile index 303e014e..5e3fb61c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,45 @@ +FROM composer:2.8 AS vendor + +ARG GITLAB_USER +ARG GITLAB_PASSWORD + +COPY database/ database/ + +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 install \ + --ignore-platform-reqs \ + --no-interaction \ + --no-plugins \ + --no-scripts \ + --no-dev \ + --optimize-autoloader \ + --classmap-authoritative \ + --prefer-dist + +FROM node:20.18 AS frontend + +ARG GITLAB_PASSWORD + +RUN mkdir -p /app/public/build + +COPY package*.json tsconfig.json vite.config.ts .eslintrc.json .stylelintrc.json /app/ +COPY resources/ /app/resources/ +WORKDIR /app +RUN npm config set @ldc-web:registry https://lab.s-web.fr/api/v4/packages/npm/ +RUN npm config set -- '//lab.s-web.fr/api/v4/packages/npm/:_authToken' "${GITLAB_PASSWORD}" +RUN npm ci && npm run prod + FROM registry.s-web.fr/ldc-web/projets/ldc-web-images-docker/ldcweb-production-8.3:latest -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/vendor/ +COPY --from=frontend --chown=${USER}:${USER} /app/public/build/ /app/public/build/ + USER root RUN chmod -R 755 /app/srcs/storage -USER www-data +USER ${USER}