ci: update docker file in order to use bun
This commit is contained in:
parent
07715c0097
commit
ae50117098
1 changed files with 10 additions and 8 deletions
18
Dockerfile
18
Dockerfile
|
|
@ -17,21 +17,23 @@ RUN composer install \
|
|||
--no-dev \
|
||||
--prefer-dist
|
||||
|
||||
FROM node:24-alpine AS frontend
|
||||
FROM oven/bun:1.3.11-alpine AS frontend
|
||||
|
||||
ARG GITLAB_PASSWORD
|
||||
|
||||
RUN mkdir -p /app/public/build
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json tsconfig.json vite.config.ts vite.config.js .stylelintrc.json /app/
|
||||
COPY package.json bun.lock* tsconfig.json vite.config.ts vite.config.js .stylelintrc.json /app/
|
||||
COPY resources/ /app/resources/
|
||||
COPY --from=vendor /app/vendor/ /app/vendor/
|
||||
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 config set @uwil:registry=https://lab.s-web.fr/api/v4/groups/ldc-web/-/packages/npm/
|
||||
RUN npm config set -- '//lab.s-web.fr/api/v4/groups/ldc-web/-/packages/npm/:_authToken' "${GITLAB_PASSWORD}"
|
||||
RUN npm ci --no-audit --no-fund --loglevel=error && npm run prod
|
||||
|
||||
RUN echo "@ldc-web:registry=https://lab.s-web.fr/api/v4/packages/npm/" >> .npmrc && \
|
||||
echo "//lab.s-web.fr/api/v4/packages/npm/:_authToken=${GITLAB_PASSWORD}" >> .npmrc && \
|
||||
echo "@uwil:registry=https://lab.s-web.fr/api/v4/groups/ldc-web/-/packages/npm/" >> .npmrc && \
|
||||
echo "//lab.s-web.fr/api/v4/groups/ldc-web/-/packages/npm/:_authToken=${GITLAB_PASSWORD}" >> .npmrc
|
||||
|
||||
RUN bun install --frozen-lockfile && bun run prod
|
||||
|
||||
FROM registry.s-web.fr/ldc-web/projets/ldc-web-images-docker/uwil-production-8.5:${PHP_8_5_TAG}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue