Skip to content

Commit 2051005

Browse files
author
khanh2906
committed
update
1 parent d1f0fd0 commit 2051005

File tree

5 files changed

+22
-22
lines changed

5 files changed

+22
-22
lines changed

lib/stubs/template/Dockerfile

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Stage 1: Builder
2-
FROM node:20 AS builder
2+
FROM node:22 AS builder
33

44
# Install necessary build tools
55
RUN apt-get update && apt-get install -y \
@@ -22,11 +22,13 @@ COPY --chown=node:node . .
2222
# Set proper permissions for the storage folder
2323
RUN mkdir -p storage && chmod -R 775 storage && chown -R node:node storage
2424

25+
# Install bamimi-cli for build
26+
RUN yarn add @knfs-tech/bamimi-cli -g
2527
# Build the application
2628
RUN yarn build
2729

2830
# Stage 2: Development
29-
FROM node:20-slim as development
31+
FROM node:22-slim as development
3032

3133
# Set working directory
3234
WORKDIR /usr/src/app
@@ -47,9 +49,8 @@ EXPOSE 3000
4749

4850
CMD ["yarn", "start"]
4951

50-
51-
# Stage 3:
52-
FROM node:20-slim as production
52+
# Stage 3: Production
53+
FROM node:22-slim as production
5354

5455
# Set working directory
5556
WORKDIR /usr/src/app
@@ -70,4 +71,4 @@ ENV NODE_ENV=production
7071
EXPOSE 3000
7172

7273
# Run the application
73-
CMD ["yarn", "start"]
74+
CMD ["yarn", "start"]

lib/stubs/template/bamimi.build.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,18 @@ module.exports = {
5353
"module-resolver", // Plugin to resolve module paths. See: https://github.com/tleunen/babel-plugin-module-resolver
5454
{
5555
root: [
56-
"./src" // Define the root directory for aliasing
56+
"./src"
5757
],
5858
alias: {
59-
"@iApp": "./src/app", // Alias for @iApp
60-
"@iKernel": "./src/kernel", // Alias for @iKernel
61-
"@iConfigs": "./src/configs", // Alias for @iConfigs
62-
"@iLibs": "./src/libs", // Alias for @iLibs
63-
"@iNotifications": "./src/notifications", // Alias for @iNotifications
64-
"@iRoutes": "./src/routes", // Alias for @iRoutes
65-
"@iModules": "./src/modules", // Alias for @iModules
66-
"@iUtils": "./src/utils", // Alias for @iUtils
67-
"@iInterfaces": "./src/interfaces" // Alias for @iInterfaces
59+
"@iApp": "./src/app",
60+
"@iKernel": "./src/kernel",
61+
"@iConfigs": "./src/configs",
62+
"@iLibs": "./src/libs",
63+
"@iNotifications": "./src/notifications",
64+
"@iRoutes": "./src/routes",
65+
"@iModules": "./src/modules",
66+
"@iUtils": "./src/utils",
67+
"@iInterfaces": "./src/interfaces"
6868
}
6969
}
7070
]

lib/stubs/template/package.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "bamimi",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "Power framework for nodejs",
55
"main": "src/server.js",
6-
"bamimiVersion": "1.0.2",
6+
"bamimiVersion": "1.0.3",
77
"bin": {
88
"bamimi-enjoy-": "./dist/routes/cli/index.js",
99
"bamimi-enjoy-dev": "./src/routes/cli/index.js"
@@ -13,7 +13,7 @@
1313
},
1414
"scripts": {
1515
"setup": "npm link .",
16-
"build": "npx @knfs-tech/bamimi-cli@latest build",
16+
"build": "bamimi-cli build",
1717
"start": "node ./dist/server.js",
1818
"dev": "nodemon ./src/server.js",
1919
"migration:create": "npx sequelize-cli migration:generate",
@@ -97,7 +97,6 @@
9797
"globals": "^15.8.0",
9898
"jest": "^29.4.3",
9999
"module-alias": "^2.2.3",
100-
"ncp": "^2.0.0",
101100
"nodemon": "^3.1.4",
102101
"sequelize-cli": "^6.6.2",
103102
"supertest": "^6.3.3",

lib/stubs/template/src/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/**
1414
* @author Kent Phung
1515
* @email daikhanh9260@gmail.com
16-
* @version 1.0.2
16+
* @version 1.0.3
1717
* @license MIT
1818
* @nation Vietnam
1919
* @link https://github.com/knfs-library/bamimi-cli

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@knfs-tech/bamimi-cli",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "Command line of Bamimi framework",
55
"bin": {
66
"bamimi-cli": "./bin/cli.js"

0 commit comments

Comments
 (0)