Merge branch 'dev' of https://git.verdnatura.es/salix into dev

This commit is contained in:
Daniel Herrero 2017-11-28 09:25:26 +01:00
commit 65e58d6b7c
6 changed files with 34 additions and 7 deletions

2
Jenkinsfile vendored
View File

@ -43,11 +43,13 @@ node
stage ("Stopping/Removing Docker")
{
env.TAG = "${env.BUILD_NUMBER}-1";
sh "docker-compose down --rmi 'all'"
}
stage ("Generar dockers")
{
env.TAG = "${env.BUILD_NUMBER}+1";
sh "docker-compose up -d --build"
}
}

View File

@ -76,7 +76,18 @@ services:
- "3005"
ports:
- "3005:3005"
print:
environment:
- NODE_ENV=${NODE_ENV}
container_name: "${BRANCH_NAME}-print"
image: "print:${TAG}"
build:
context: ./services
dockerfile: /print/Dockerfile
expose:
- "3006"
ports:
- "3006:3006"
nginx:
container_name: "${BRANCH_NAME}-nginx"
image: "nginx:${TAG}"
@ -95,3 +106,4 @@ services:
- "mailer:${BRANCH_NAME}-mailer"
- "production:${BRANCH_NAME}-production"
- "route:${BRANCH_NAME}-route"
- "print:${BRANCH_NAME}-print"

View File

@ -38,9 +38,9 @@ module.exports = {
if (host == '127.0.0.1')
proxy = config.proxy.localhost;
else if(process.env.NODE_ENV == 'production')
else if (process.env.NODE_ENV == 'production')
proxy = config.proxy.salix;
else if(process.env.NODE_ENV == 'development')
else if (process.env.NODE_ENV == 'development')
proxy = config.proxy.testSalix;
this.request.proxyHost = `http://${proxy.host}:${proxy.port}`;

View File

@ -9,7 +9,7 @@ try {
config = Object.assign(require(configPath), require(devConfigPath));
} catch (e) {
if (e.code == 'MODULE_NOT_FOUND')
return require(configPath);
config = require(configPath);
}
config.proxy = require('../../nginx/config.json');

13
services/print/Dockerfile Normal file
View File

@ -0,0 +1,13 @@
FROM node:6.9.1
COPY . /app
WORKDIR /app
RUN npm install
RUN npm -g install pm2
CMD ["pm2-docker", "./server/server.js"]
EXPOSE 3006

View File

@ -9,7 +9,7 @@ try {
config = Object.assign(require(configPath), require(devConfigPath));
} catch (e) {
if (e.code == 'MODULE_NOT_FOUND')
return require(configPath);
config = require(configPath);
}
config.proxy = require('../../nginx/config.json');