-
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(maintenance): upgrade project to version 2.0.0 with significant…
… updates and improvements. - Updated dependencies including NestJS, TypeORM, and PostgreSQL to their latest versions for enhanced performance and security. - Refactored Dockerfile and docker-compose.yml for better container management and health checks. - Improved application security with helmet middleware and validation pipes. - Consolidated configuration management using dotenv. - Added health check endpoints and refined error handling in the application bootstrap process. - Updated README and setup scripts for clarity and improved user experience. - Removed unused files and optimized project structure. This release focuses on enhancing the overall stability and maintainability of the project.
- Loading branch information
1 parent
3a013d7
commit 80bdaa5
Showing
20 changed files
with
8,126 additions
and
8,851 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ docker-compose.yml | |
Dockerfile | ||
endpoints.json | ||
README.md | ||
.husky |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,44 @@ | ||
FROM node:14-alpine | ||
# Build stage | ||
FROM node:20-alpine AS builder | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY package*.json ./ | ||
COPY tsconfig*.json ./ | ||
COPY nest-cli.json ./ | ||
|
||
# Install all dependencies (including dev dependencies) | ||
RUN npm ci | ||
|
||
COPY . . | ||
RUN npm run build | ||
|
||
# Production stage | ||
FROM node:20-alpine AS production | ||
|
||
ARG NODE_ENV=production | ||
ENV NODE_ENV=${NODE_ENV} | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY package.json package-lock.json ./ | ||
COPY ./src ./src | ||
COPY ./nest-cli.json ./ | ||
COPY ./tsconfig.build.json ./ | ||
COPY ./tsconfig.json ./ | ||
COPY package*.json ./ | ||
|
||
RUN npm install -g @nestjs/cli | ||
RUN npm ci --only=production | ||
# Install only production dependencies | ||
RUN npm ci --omit=dev | ||
|
||
RUN npm run build | ||
COPY --from=builder /usr/src/app/dist ./dist | ||
|
||
# Add non-root user | ||
RUN addgroup -g 1001 nodejs && \ | ||
adduser -S -u 1001 -G nodejs nodejs | ||
|
||
USER nodejs | ||
|
||
# Add these environment variables to prevent Husky installation | ||
ENV HUSKY=0 | ||
ENV CI=true | ||
|
||
ENV PORT 3000 | ||
ENV PORT 9229 | ||
EXPOSE 3000 | ||
EXPOSE 9229 | ||
|
||
CMD ["node", "dist/main"] |
Oops, something went wrong.