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
39f7ace1
Commit
39f7ace1
authored
Nov 04, 2025
by
Đoàn Quốc Huy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[tag]staging
parent
ccec9283
Pipeline
#43306
failed with stages
in 29 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
build.Dockerfile
.docker/build.Dockerfile
+14
-0
No files found.
.docker/build.Dockerfile
View file @
39f7ace1
# Stage 1: Build
FROM registry.gitlab.com/meusolutions/vcci-news:base AS buildbase
FROM registry.gitlab.com/meusolutions/vcci-news:base AS buildbase
# 'base' image đã có sẵn node_modules từ job trước (dùng làm cache)
# Copy toàn bộ source code (bao gồm package.json mới)
COPY . .
COPY . .
# *** THÊM LỆNH NÀY ***
# Chạy 'npm install' một lần nữa để đồng bộ node_modules
# với file package.json mới và cài đặt devDependencies (như ts-node, orval)
RUN npm install
# Bây giờ các script build sẽ chạy được
RUN npm run generate:api
RUN npm run generate:api
RUN npm run build
RUN npm run build
# Stage 2: Production Image (Không đổi)
FROM node:20-alpine AS build
FROM node:20-alpine AS build
WORKDIR /app
WORKDIR /app
COPY package*.json ./
COPY package*.json ./
# Chỉ cài đặt production dependencies cho image cuối cùng
RUN npm install --production
RUN npm install --production
# Copy các file đã build từ stage 'buildbase'
COPY --from=buildbase /app/.next ./.next
COPY --from=buildbase /app/.next ./.next
COPY --from=buildbase /app/public ./public
COPY --from=buildbase /app/public ./public
...
...
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