This commit is contained in:
Vicente Falco 2017-11-08 07:08:34 +01:00
commit 97da7e5c10
9 changed files with 37 additions and 34 deletions

24
Jenkinsfile vendored
View File

@ -9,6 +9,9 @@ env.NODE_ENV = branchName;
env.BRANCH_NAME = branchName;
env.TAG = "${env.BUILD_NUMBER}";
if (branchName == "test")
env.NODE_ENV = "development";
if (branchName == branchProduction)
dockerHost = "tcp://172.16.255.29:2375";
@ -25,35 +28,20 @@ node
sh "npm install"
}
stage ('build Project Salix'){
stage ('build Project'){
sh "gulp build"
}
stage ("docker")
{
stage ("Stopping/Removing Docker")
{
try
{
sh "docker-compose stop"
sh "docker-compose rm -f"
}catch(Exception _){
echo "Error Stopping/Removing dockers"
}
sh "docker-compose down --rmi all"
}
stage ("Generar dockers")
{
stage ("build dockers")
{
sh "docker-compose build "
}
stage ("up dockers")
{
sh "docker-compose up -d"
}
sh "docker-compose up -d --build"
}
}
}

View File

@ -6,7 +6,8 @@ services:
container_name: "${BRANCH_NAME}-auth"
image: "auth:${TAG}"
build:
context: ./services/auth
context: ./services
dockerfile: /auth/Dockerfile
expose:
- "3000"
ports:
@ -18,7 +19,8 @@ services:
container_name: "${BRANCH_NAME}-salix"
image: "salix:${TAG}"
build:
context: ./services/salix
context: ./services
dockerfile: /salix/Dockerfile
expose:
- "3001"
ports:
@ -30,7 +32,8 @@ services:
container_name: "${BRANCH_NAME}-client"
image: "client:${TAG}"
build:
context: ./services/client
context: ./services
dockerfile: /client/Dockerfile
expose:
- "3002"
ports:
@ -54,7 +57,8 @@ services:
container_name: "${BRANCH_NAME}-production"
image: "production:${TAG}"
build:
context: ./services/production
context: ./services
dockerfile: /production/Dockerfile
expose:
- "3004"
ports:

View File

@ -1,6 +1,8 @@
FROM node:6.9.1
COPY . /app
COPY ./auth /app
COPY ./loopback /loopback
WORKDIR /app
@ -8,6 +10,6 @@ RUN npm install
RUN npm -g install pm2
CMD ["pm2-docker", "."]
CMD ["pm2-docker", "./server/server.js"]
EXPOSE 3000

View File

@ -1,6 +1,8 @@
FROM node:6.9.1
COPY . /app
COPY ./client /app
COPY ./loopback /loopback
WORKDIR /app
@ -8,6 +10,6 @@ RUN npm install
RUN npm -g install pm2
CMD ["pm2-docker", "."]
CMD ["pm2-docker", "./server/server.js"]
EXPOSE 3002

View File

@ -8,6 +8,6 @@ RUN npm install
RUN npm -g install pm2
CMD ["pm2-docker", "."]
CMD ["pm2-docker", "./server/server.js"]
EXPOSE 3003

View File

@ -10,7 +10,8 @@
"mustache": "^2.3.0",
"mysql": "^2.13.0",
"nodemailer": "^4.0.1",
"path": "^0.12.7"
"path": "^0.12.7",
"request": "^2.83.0"
},
"repository": {
"type": "git",

View File

@ -1,6 +1,8 @@
FROM node:6.9.1
COPY . /app
COPY ./production /app
COPY ./loopback /loopback
WORKDIR /app
@ -8,6 +10,6 @@ RUN npm install
RUN npm -g install pm2
CMD ["pm2-docker", "."]
CMD ["pm2-docker", "./server/server.js"]
EXPOSE 3004

View File

@ -1,6 +1,8 @@
FROM node:6.9.1
COPY . /app
COPY ./route /app
COPY ./loopback /loopback
WORKDIR /app
@ -8,6 +10,6 @@ RUN npm install
RUN npm -g install pm2
CMD ["pm2-docker", "."]
CMD ["pm2-docker", "./server/server.js"]
EXPOSE 3005

View File

@ -1,6 +1,8 @@
FROM node:6.9.1
COPY . /app
COPY ./salix /app
COPY ./loopback /loopback
WORKDIR /app
@ -8,6 +10,6 @@ RUN npm install
RUN npm -g install pm2
CMD ["pm2-docker", "."]
CMD ["pm2-docker", "./server/server.js"]
EXPOSE 3001