Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
asdasd
Project
Project
Details
Activity
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fbotta
asdasd
Commits
47d689e5
Commit
47d689e5
authored
Dec 08, 2018
by
Pushparagavan Sivaji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding docker and yml
parent
009bcd62
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
0 deletions
+59
-0
.gitlab-ci.yml
.gitlab-ci.yml
+48
-0
Dockerfile
Dockerfile
+11
-0
No files found.
.gitlab-ci.yml
0 → 100644
View file @
47d689e5
variables
:
CI_REGISTRY_USER
:
"
playground"
CI_REGISTRY_PASSWORD
:
"
Dd603c48d603c48"
CI_REGISTRY
:
"
pg-registry.altimetrik.com"
CI_REGISTRY_IMAGE
:
"
pg-registry.altimetrik.com/playground"
SONAR_URL
:
"
http://pg-sonar.altimetrik.com/about"
SONAR_ANALYSIS_MODE
:
publish
stages
:
-
Build
-
ImagePrune
-
Buildimage
-
Dockerizing
-
Deploy
Dockerbuild
:
stage
:
Build
script
:
-
docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
-
docker build -t $CI_REGISTRY_IMAGE .
ImagePrune
:
stage
:
ImagePrune
script
:
-
docker rm -f $CI_PROJECT_NAME
allow_failure
:
true
ImageTagging
:
stage
:
Dockerizing
script
:
-
docker tag $CI_REGISTRY_IMAGE $CI_REGISTRY_IMAGE/$CI_PROJECT_NAME
DockerPush
:
stage
:
Dockerizing
script
:
-
docker push $CI_REGISTRY_IMAGE/$CI_PROJECT_NAME
Docker-deploy
:
stage
:
Deploy
script
:
-
docker run --name $CI_PROJECT_NAME -d -p 8072:80 $CI_REGISTRY_IMAGE/$CI_PROJECT_NAME
only
:
-
master
Dockerfile
0 → 100644
View file @
47d689e5
FROM
node:10-alpine as builder
COPY
package.json package-lock.json ./
RUN
npm i
&&
mkdir
/ng-app
&&
mv
./node_modules ./ng-app
WORKDIR
/ng-app
COPY
. .
RUN $(
npm bin
)
/ng build
--prod
--output-path
=
dist
FROM
nginx:1.14.1-alpine
COPY
nginx/default.conf /etc/nginx/conf.d/
RUN
rm
-rf
/usr/share/nginx/html/
*
COPY
--from=builder /ng-app/dist /usr/share/nginx/html
CMD
["nginx", "-g", "daemon off;"]
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