All checks were successful
ci/woodpecker/push/publish_instable Pipeline was successful
29 lines
926 B
Docker
29 lines
926 B
Docker
FROM oven/bun:1 AS base
|
|
WORKDIR /usr/src/app
|
|
|
|
# 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épendances de production.
|
|
RUN mkdir -p /temp/prod
|
|
COPY package.json bun.lock /temp/prod/
|
|
RUN cd /temp/prod && bun install --frozen-lockfile --production
|
|
|
|
# Récupère node_modules et les fichiers du projet.
|
|
FROM base AS prerelease
|
|
COPY --from=install /temp/dev/node_modules/ node_modules
|
|
COPY . .
|
|
# Compile le projet.
|
|
ENV NODE_ENV=production
|
|
RUN bun --bun vite build
|
|
|
|
# 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
|
|
|
|
# Démarre Angie.
|
|
EXPOSE 80
|
|
CMD ["angie", "-g", "daemon off;"]
|