Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quantum-blocks
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
quantum-blocks
Commits
e12cfcc3
Commit
e12cfcc3
authored
Jul 02, 2022
by
薛智杰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 增加测试环境 dockerfile
parent
48e8616f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
1 deletion
+27
-1
.dockerignore
.dockerignore
+6
-0
server.js
bin/server.js
+0
-1
qa.Dockerfile
qa.Dockerfile
+21
-0
No files found.
.dockerignore
0 → 100644
View file @
e12cfcc3
node_modules
logs
run
.vscode
.git
typings
\ No newline at end of file
bin/server.js
View file @
e12cfcc3
...
@@ -15,7 +15,6 @@ npm.load(() => {
...
@@ -15,7 +15,6 @@ npm.load(() => {
if
(
process
.
env
.
NODE_ENV
===
'
production
'
)
{
if
(
process
.
env
.
NODE_ENV
===
'
production
'
)
{
npm
.
run
(
"
start
"
);
npm
.
run
(
"
start
"
);
}
else
{
}
else
{
npm
.
run
(
"
ii
"
);
npm
.
run
(
"
test
"
);
npm
.
run
(
"
test
"
);
}
}
});
});
...
...
qa.Dockerfile
0 → 100644
View file @
e12cfcc3
FROM
node:14-alpine AS builder
WORKDIR
/app
COPY
package*.json ./
RUN
[
"npm"
,
"install"
,
"--production"
,
"--registry=http://npmprivate.quantgroups.com/"
]
FROM
node:14-alpine
WORKDIR
/home/quant_group
COPY
--from=builder /app/node_modules ./node_modules
COPY
. .
RUN
[
"npm"
,
"run"
,
"tsc"
]
# 加载 apollo 时必须有这个环境变量
ARG
NAMESPACE=bfe
# build 时间较长,实际做了什么
# "build:test": "cross-env NODE_ENV=test APOLLO_CLUSTER=k8s npm run apollo && cross-env NODE_ENV=production COS_ENV=production easy build --devtool",
RUN
[
"npm"
,
"run"
,
"build:test"
]
EXPOSE
80
# 为什么又加载一遍 apollo
CMD
["node", "bin/server.js"]
\ No newline at end of file
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