2025-02-23
2025-02-24
This commit is contained in:
parent
2212f4fc14
commit
0f52ff0cef
40 changed files with 846 additions and 75 deletions
31
Dockerfile
Normal file
31
Dockerfile
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
FROM oven/bun:slim AS base
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Installe les dépendences.
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
CMD ["angie", "-g", "daemon off;"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue