Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
chinguyen_nodejs_managestudents
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
1
Merge Requests
1
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
chinguyen
chinguyen_nodejs_managestudents
Commits
b4203499
Commit
b4203499
authored
Jun 23, 2022
by
cicd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[tag]dev
parent
03125013
Pipeline
#15997
passed with stages
in 3 minutes and 58 seconds
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
19 deletions
+6
-19
.gitlab-ci.yml
.gitlab-ci.yml
+0
-1
Dockerfile
Dockerfile
+2
-6
deploy.sh
cicd/deploy.sh
+1
-1
index.js
index.js
+3
-11
No files found.
.gitlab-ci.yml
View file @
b4203499
...
...
@@ -47,4 +47,3 @@ deploy:
-
release
tags
:
-
chinguyen_nodejs_managestudent
#
\ No newline at end of file
Dockerfile
View file @
b4203499
### STAGE 1: RUN ###
FROM
node:15.1.0
RUN
chmod
1777 /tmp
RUN
mkdir
/data
RUN
echo
"Run in create image docker"
# ENV OPENSSL_CONF=/opt/openssl.cnf
FROM
node:alpine
WORKDIR
/usr/src/app
COPY
package.json ./
RUN
npm
install
express
...
...
cicd/deploy.sh
View file @
b4203499
...
...
@@ -15,4 +15,4 @@ echo $(pwd)
cd
../..
echo
$(
pwd
)
ls
-la
|
sudo rm
-r
*
sudo rm
-r
*
index.js
View file @
b4203499
...
...
@@ -3,16 +3,8 @@ var app = express();
var
fs
=
require
(
"fs"
)
app
.
get
(
'/'
,
function
(
req
,
res
)
{
res
.
send
(
'Hello World, changed'
);
console
.
log
(
new
Date
())
data
=
"content of file"
fs
.
readFile
(
'code.html'
,
{
flag
:
'wx'
},
function
(
err
,
data
)
{
if
(
err
)
throw
err
;
// in ra nội dung đọc được
res
.
write
(
data
);
//kết thúc response
res
.
end
();
});
res
.
send
(
'Hello World'
);
})
var
server
=
app
.
listen
(
8081
,
function
()
{
...
...
@@ -20,7 +12,7 @@ var server = app.listen(8081, function () {
var
host
=
server
.
address
().
address
var
port
=
server
.
address
().
port
console
.
log
(
"
Ung dung Node.js dang lang nghe tai dia chi
: http://%s:%s"
,
host
,
port
)
console
.
log
(
"
NodeJS is listenning at
: http://%s:%s"
,
host
,
port
)
})
//
\ 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