diff --git a/Dockerfile b/Dockerfile index 1c0b55f..58c6793 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,6 +13,9 @@ RUN npm ci --legacy-peer-deps # Copier le code source COPY . . +# Installer les dépendances +RUN npx prisma generate + # Builder l'application RUN npm run build @@ -32,6 +35,9 @@ WORKDIR /app # Copier package.json et package-lock.json COPY package*.json ./ +# Copier le schema Prisma +COPY prisma ./prisma/ + # Installer UNIQUEMENT les dépendances de production avec --legacy-peer-deps RUN npm ci --omit=dev --legacy-peer-deps && \ npm cache clean --force diff --git a/README.md b/README.md index 8f0f65f..f3415e8 100644 --- a/README.md +++ b/README.md @@ -96,3 +96,8 @@ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors ## License Nest is [MIT licensed](https://github.com/nestjs/nest/blob/master/LICENSE). + +## docker +docker build -t service-core:latest . +docker run -p 3000:3000 service-core:latest +