Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
VCCI-News
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Văn Hoàng
VCCI-News
Commits
337f3bdb
Commit
337f3bdb
authored
Sep 04, 2026
by
Phạm Quang Bảo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release' into 'develop-news'
# Conflicts: # orval.config.ts
parents
0f99ddbc
e62712af
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
68 additions
and
11 deletions
+68
-11
build.sh
.ci/build/build.sh
+1
-0
base.Dockerfile
.docker/base.Dockerfile
+10
-3
build.Dockerfile
.docker/build.Dockerfile
+16
-6
.dockerignore
.dockerignore
+39
-0
README.md
README.md
+1
-1
page.tsx
src/app/admin/base-config/page.tsx
+1
-1
No files found.
.ci/build/build.sh
View file @
337f3bdb
#!/bin/bash
set
-e
cd
.ci
sudo
docker build
-t
$image_name
:
$tag
-f
$docker_path
/build.Dockerfile ../
sudo
docker
logout
registry.gitlab.com
...
...
.docker/base.Dockerfile
View file @
337f3bdb
FROM node:22-alpine
FROM node:22-alpine
AS base
WORKDIR /app
COPY package*.json ./
RUN npm install
# Cài pnpm qua corepack — cách chính thức của Node.js
RUN corepack enable && corepack prepare pnpm@latest --activate
# Copy manifest + lockfile trước để tận dụng Docker layer cache
COPY package.json pnpm-lock.yaml* ./
# Cài dependencies production + dev (cần dev vì next build, eslint, orval tại build stage)
RUN pnpm install --frozen-lockfile
.docker/build.Dockerfile
View file @
337f3bdb
...
...
@@ -6,11 +6,18 @@ ARG NEXT_PUBLIC_FRONTEND_HOST=https://vcci-hcm.org.vn
ENV NEXT_PUBLIC_BACKEND_HOST=$NEXT_PUBLIC_BACKEND_HOST
ENV NEXT_PUBLIC_FRONTEND_HOST=$NEXT_PUBLIC_FRONTEND_HOST
# Base image cũ có thể chưa có pnpm — bật corepack ở đâng để chắc chắn.
# (Sau khi base image được rebuild với base.Dockerfile mới, dòng này sẽ là no-op.)
RUN corepack enable && corepack prepare pnpm@latest --activate
# Copy toàn bộ source (đã được .dockerignore lọc trừ node_modules / .next / openapi)
COPY . .
# Generate API client + build
RUN node scripts/generate-api.mjs
RUN npm run build
RUN
p
npm run build
# ----------------- Production stage -----------------
FROM node:22-alpine AS production
WORKDIR /app
...
...
@@ -20,15 +27,18 @@ ARG NEXT_PUBLIC_FRONTEND_HOST=https://vcci-hcm.org.vn
ENV NEXT_PUBLIC_BACKEND_HOST=$NEXT_PUBLIC_BACKEND_HOST
ENV NEXT_PUBLIC_FRONTEND_HOST=$NEXT_PUBLIC_FRONTEND_HOST
COPY --from=builder /app/package*.json ./
COPY --from=builder /app/node_modules ./node_modules
RUN corepack enable && corepack prepare pnpm@latest --activate
RUN npm prune --production
# Chỉ copy manifest + lockfile (KHÔNG copy node_modules).
# Cài fresh production-only deps để tránh `pnpm prune --prod` bị
# ERR_PNPM_IGNORED_BUILDS trên pnpm v11+.
COPY --from=builder /app/package.json ./
COPY --from=builder /app/pnpm-lock.yaml* ./
RUN pnpm install --prod --frozen-lockfile --ignore-scripts
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/public ./public
EXPOSE 3000
CMD ["npm", "run", "start"]
CMD ["
p
npm", "run", "start"]
.dockerignore
0 → 100644
View file @
337f3bdb
# =====================================================================
# VCCI-News .dockerignore
# Tránh copy các file không cần thiết vào Docker image.
# Bắt buộc có để build Docker nhất quán giữa các môi trường.
# =====================================================================
# Node / Next.js
node_modules
.pnp
.pnp.js
.yarn/install-state.gz
# Build output
.next/
out/
build/
dist/
# Misc
.DS_Store
*.pem
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.vercel
.turbo
.idea
.vscode
# Env / secrets
.env*.local
.env.production.local
# Test
coverage
.nyc_output
# Swagger spec — cần thiết cho Docker build để generate API client nhất quán với local
# (orval.config.ts sẽ ưu dụng local file trước, fallback sang fetch từ BE)
README.md
View file @
337f3bdb
src/app/admin/base-config/page.tsx
View file @
337f3bdb
...
...
@@ -677,7 +677,7 @@ export default function AdminBaseConfigPage() {
}
catch
(
error
)
{
console
.
error
(
error
);
if
(
mounted
)
{
toast
.
error
(
"Kh
ông thể tải danh sá
ch banner"
);
toast
.
error
(
"Kh
ông thể tải danh sá
ch banner"
);
}
}
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment