Docker
This commit is contained in:
parent
97fbc75e05
commit
00dd05ba6d
|
@ -7,14 +7,15 @@ def branchName = "${env.BRANCH_NAME}";
|
|||
def branchNameTest = "preprod";
|
||||
def branchNameProd = "master";
|
||||
def prefixDocker = "test";
|
||||
def dockerNginxName = ["nginx", "-p 80:80 --privileged --link test-auth:auth --link test-salix:salix --link test-client:client"]
|
||||
def dockerNginxName = ["nginx", "-p 80:80 --privileged --link test-auth:auth --link test-salix:salix --link test-client:client --link test-mailer:mailer"]
|
||||
def dockerAuthName = ["auth", "-p 3000:3000"]
|
||||
def dockerSalixName = ["salix", "-p 3001:3001"]
|
||||
def dockerClientName = ["client", "-p 3002:3002"]
|
||||
def dockerMailerName = ["mailer", "-p 3003:3003"]
|
||||
|
||||
def buildNumber = "${env.BUILD_NUMBER}";
|
||||
|
||||
def dockers = [dockerAuthName, dockerSalixName, dockerClientName, dockerNginxName]
|
||||
def dockers = [dockerAuthName, dockerSalixName, dockerClientName, dockerMailerName, dockerNginxName]
|
||||
|
||||
node {
|
||||
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
FROM node:6.9.1
|
||||
|
||||
COPY . /app
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN npm install
|
||||
|
||||
CMD ["npm", "start"]
|
||||
|
||||
EXPOSE 3003
|
|
@ -31,14 +31,17 @@ http {
|
|||
location ~ ^/auth(?:/(.*))?$ {
|
||||
proxy_pass http://127.0.0.1:3000/$1$is_args$args;
|
||||
}
|
||||
location ~ ^(?:/(.*))?$ {
|
||||
proxy_pass http://127.0.0.1:3001/$1$is_args$args;
|
||||
}
|
||||
location ~ ^/client(?:/(.*))?$ {
|
||||
proxy_pass http://127.0.0.1:3002/$1$is_args$args;
|
||||
}
|
||||
location ~ ^/mailer(?:/(.*))?$ {
|
||||
proxy_pass http://127.0.0.1:3003/$1$is_args$args;
|
||||
}
|
||||
location ~ ^(?:/(.*))?$ {
|
||||
proxy_pass http://127.0.0.1:3001/$1$is_args$args;
|
||||
location ~ ^/production(?:/(.*))?$ {
|
||||
proxy_pass http://127.0.0.1:3004/$1$is_args$args;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -19,21 +19,24 @@ http {
|
|||
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
location /static {
|
||||
location ~ ^/static(?:/(.*))?$ {
|
||||
alias /usr/share/nginx/html;
|
||||
autoindex on;
|
||||
}
|
||||
location ~ ^/auth(?:/(.*))?$ {
|
||||
proxy_pass http://auth:3000/$1$is_args$args;
|
||||
}
|
||||
location ~ ^(?:/(.*))?$ {
|
||||
proxy_pass http://salix:3001/$1$is_args$args;
|
||||
}
|
||||
location ~ ^/client(?:/(.*))?$ {
|
||||
proxy_pass http://client:3002/$1$is_args$args;
|
||||
}
|
||||
location ~ ^/mailer(?:/(.*))?$ {
|
||||
proxy_pass http://mailer:3003/$1$is_args$args;
|
||||
}
|
||||
location ~ ^(?:/(.*))?$ {
|
||||
proxy_pass http://salix:3001/$1$is_args$args;
|
||||
location ~ ^/production(?:/(.*))?$ {
|
||||
proxy_pass http://production:3004/$1$is_args$args;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
FROM node:6.9.1
|
||||
|
||||
COPY . /app
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN npm install
|
||||
|
||||
CMD ["npm", "start"]
|
||||
|
||||
EXPOSE 3004
|
Loading…
Reference in New Issue