2025-02-24
All checks were successful
ci/woodpecker/push/publish_instable Pipeline was successful

This commit is contained in:
gcch 2025-02-24 00:19:17 +01:00
commit a510899ff1
17 changed files with 309 additions and 103 deletions

View file

@ -1,13 +1,12 @@
FROM oven/bun:slim AS base
WORKDIR /usr/src/app
# Installe les dépendences.
# Installe les dépendances de développement.
FROM base AS install
RUN mkdir -p /temp/dev
COPY package.json bun.lock /temp/dev/
RUN cd /temp/dev && bun install --frozen-lockfile
# Installe les dépendences de production.
# Installe les dépendances de production.
RUN mkdir -p /temp/prod
COPY package.json bun.lock /temp/prod/
RUN cd /temp/prod && bun install --frozen-lockfile --production
@ -16,16 +15,15 @@ RUN cd /temp/prod && bun install --frozen-lockfile --production
FROM base AS prerelease
COPY --from=install /temp/dev/node_modules/ node_modules
COPY . .
# Compile le projet.
ENV NODE_ENV production
ENV NODE_ENV=production
RUN bun --bun vite build
# Créé le nécessaire pour Angie.
# Créé le nécessaire pour Angie, le proxy inversé servant l'application.
FROM docker.angie.software/angie:minimal AS release
COPY --from=prerelease /usr/src/app/dist/ /usr/share/angie/html/
COPY ./docker/default.conf /etc/angie/http.d/default.conf
EXPOSE 80
# Démarre Angie.
EXPOSE 80
CMD ["angie", "-g", "daemon off;"]