Docker service print

This commit is contained in:
Vicente Falco 2017-11-28 08:12:39 +01:00
parent 09d788faaa
commit 8b79ec5cc8
2 changed files with 17 additions and 4 deletions

View File

@ -36,13 +36,13 @@ module.exports = {
let host = this.request.headers.host.split(':')[0];
let proxy;
if (host == '127.0.0.1')
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}`;
this.request.user = {
id: token.userId,

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