Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lecture-devops-app
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
s80984
lecture-devops-app
Commits
260520c7
Commit
260520c7
authored
3 years ago
by
s80984
Browse files
Options
Downloads
Patches
Plain Diff
Update pipeline build
parent
5c93a9ba
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#14147
failed
3 years ago
Stage: build
Stage: test
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+1
-1
1 addition, 1 deletion
.gitlab-ci.yml
app/server/Dockerfile.test
+47
-0
47 additions, 0 deletions
app/server/Dockerfile.test
docker-compose.test.yml
+27
-0
27 additions, 0 deletions
docker-compose.test.yml
with
75 additions
and
1 deletion
.gitlab-ci.yml
+
1
−
1
View file @
260520c7
...
@@ -71,7 +71,7 @@ job_test-image:
...
@@ -71,7 +71,7 @@ job_test-image:
before_script
:
before_script
:
-
apk add --no-cache docker-compose
-
apk add --no-cache docker-compose
script
:
script
:
-
docker-compose -f docker-compose.test.yml
up
-
docker-compose -f docker-compose.test.yml up
# - npm run test
# - npm run test
# - docker run
# - docker run
# --detach
# --detach
...
...
This diff is collapsed.
Click to expand it.
app/server/Dockerfile.test
0 → 100644
+
47
−
0
View file @
260520c7
# FROM node:16
# # Copy your source file directory into /app
# # WORKDIR ${HOME}
# # COPY /app
# # Change to /app
# WORKDIR /app
# # Install make
# # RUN apt update && apt install -y make
# # COPY package*.json ./
# WORKDIR /app/client
# RUN npm install
# WORKDIR /app/server
# RUN npm install
# # SERVER_PUBLIC_URL ?= http://127.0.0.1:3001
# # # run make
# # RUN make install
# # RUN make build
# # CMD ["npm", "serve", "--port 4000"]
# # RUN make run
# EXPOSE 8080
FROM
node
:
16
# Create app directory
# WORKDIR /usr/src/app
WORKDIR
/
usr
/
src
/
app
# COPY ./client/package*.json ./
COPY
package
*.
json
.
/
RUN
npm
install
# Bundle app source
COPY
.
.
EXPOSE
3000
CMD
[
"npm"
,
"run test"
]
This diff is collapsed.
Click to expand it.
docker-compose.test.yml
0 → 100644
+
27
−
0
View file @
260520c7
version
:
'
3'
services
:
mongo
:
container_name
:
mongo
image
:
mongo
ports
:
-
'
27017:27017'
volumes
:
-
mongodb:/.local/db/data/db
app
:
container_name
:
node-mongo-app
# image: ${CI_REGISTRY_IMAGE}:${CI_PIPELINE_IID}-${CI_COMMIT_SHORT_SHA}
restart
:
always
build
:
context
:
./app/server
dockerfile
:
Dockerfile.test
ports
:
-
'
80:3000'
links
:
-
mongo
environment
:
-
PORT=3000
-
MONGODB_URL=mongodb://mongo:27017/todo-app
-
JWT_SECRET=myjwtsecret
volumes
:
mongodb
:
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment