diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0c781c5b..9b1444d2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,10 +12,7 @@ include: file: "security/composer.yml" - project: "ldc-web/shared-ci" ref: "main" - file: "build/composer.yml" - - project: "ldc-web/shared-ci" - ref: "main" - file: "build/docker-multistage.yml" + file: "build/docker.yml" - project: "ldc-web/shared-ci" ref: "main" file: "test/test.yml" @@ -220,8 +217,14 @@ bun-security: # * BUILD ------------------------------------------------------------------- -npm-build: - stage: build +.docker-build: + dependencies: [] + needs: [] script: - - echo "Frontend is built directly within Docker multi-stage build" - + - /kaniko/executor + --context "${CI_PROJECT_DIR}" + --dockerfile "${CI_PROJECT_DIR}/Dockerfile" + --destination "${IMAGE_TAG}" + --build-arg GITLAB_USER="${CI_DEPLOY_USER}" + --build-arg GITLAB_PASSWORD="${CI_DEPLOY_PASSWORD}" + --build-arg PHP_8_5_TAG="${PHP_8_5_TAG:-latest}" diff --git a/Dockerfile b/Dockerfile index 87fb98cc..fde3b79f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,5 @@ +ARG PHP_8_5_TAG=latest + FROM composer:2.9 AS vendor ARG GITLAB_USER @@ -8,7 +10,7 @@ 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 config gitlab-token.lab.s-web.fr "${GITLAB_USER}" "${GITLAB_PASSWORD}" RUN composer install \ --ignore-platform-reqs \ --no-interaction \ @@ -34,6 +36,7 @@ RUN npm config set -- '//lab.s-web.fr/api/v4/groups/ldc-web/-/packages/npm/:_aut RUN npm ci --no-audit --no-fund --loglevel=error && npm run prod +ARG PHP_8_5_TAG FROM registry.s-web.fr/ldc-web/projets/ldc-web-images-docker/uwil-production-8.5:${PHP_8_5_TAG} ARG USER=www-data diff --git a/manifest.yaml b/manifest.yaml index f3c34a2e..a4e82af5 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -11,8 +11,8 @@ data: SESSION_DRIVER: "${APP_SESSION_DRIVER}" LOG_CHANNEL: "k8s" CACHE_STORE: "${APP_CACHE_STORE}" - DB_HOST: "${APP_DB_HOST}" - DB_PORT: "${APP_DB_PORT}" + DB_HOST: "${APP_GLOBAL_OVH_MYSQL_HOST}" + DB_PORT: "${APP_GLOBAL_OVH_MYSQL_PORT}" DB_DATABASE: "${APP_DB_DATABASE}" DB_CONNECTION: "mysql" DB_USERNAME: "${APP_DB_USERNAME}"