Docker
This commit is contained in:
parent
97fbc75e05
commit
00dd05ba6d
|
@ -7,14 +7,15 @@ def branchName = "${env.BRANCH_NAME}";
|
||||||
def branchNameTest = "preprod";
|
def branchNameTest = "preprod";
|
||||||
def branchNameProd = "master";
|
def branchNameProd = "master";
|
||||||
def prefixDocker = "test";
|
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 dockerAuthName = ["auth", "-p 3000:3000"]
|
||||||
def dockerSalixName = ["salix", "-p 3001:3001"]
|
def dockerSalixName = ["salix", "-p 3001:3001"]
|
||||||
def dockerClientName = ["client", "-p 3002:3002"]
|
def dockerClientName = ["client", "-p 3002:3002"]
|
||||||
|
def dockerMailerName = ["mailer", "-p 3003:3003"]
|
||||||
|
|
||||||
def buildNumber = "${env.BUILD_NUMBER}";
|
def buildNumber = "${env.BUILD_NUMBER}";
|
||||||
|
|
||||||
def dockers = [dockerAuthName, dockerSalixName, dockerClientName, dockerNginxName]
|
def dockers = [dockerAuthName, dockerSalixName, dockerClientName, dockerMailerName, dockerNginxName]
|
||||||
|
|
||||||
node {
|
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(?:/(.*))?$ {
|
location ~ ^/auth(?:/(.*))?$ {
|
||||||
proxy_pass http://127.0.0.1:3000/$1$is_args$args;
|
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(?:/(.*))?$ {
|
location ~ ^/client(?:/(.*))?$ {
|
||||||
proxy_pass http://127.0.0.1:3002/$1$is_args$args;
|
proxy_pass http://127.0.0.1:3002/$1$is_args$args;
|
||||||
}
|
}
|
||||||
location ~ ^/mailer(?:/(.*))?$ {
|
location ~ ^/mailer(?:/(.*))?$ {
|
||||||
proxy_pass http://127.0.0.1:3003/$1$is_args$args;
|
proxy_pass http://127.0.0.1:3003/$1$is_args$args;
|
||||||
}
|
}
|
||||||
location ~ ^(?:/(.*))?$ {
|
location ~ ^/production(?:/(.*))?$ {
|
||||||
proxy_pass http://127.0.0.1:3001/$1$is_args$args;
|
proxy_pass http://127.0.0.1:3004/$1$is_args$args;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,21 +19,24 @@ http {
|
||||||
|
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
|
|
||||||
location /static {
|
location ~ ^/static(?:/(.*))?$ {
|
||||||
alias /usr/share/nginx/html;
|
alias /usr/share/nginx/html;
|
||||||
autoindex on;
|
autoindex on;
|
||||||
}
|
}
|
||||||
location ~ ^/auth(?:/(.*))?$ {
|
location ~ ^/auth(?:/(.*))?$ {
|
||||||
proxy_pass http://auth:3000/$1$is_args$args;
|
proxy_pass http://auth:3000/$1$is_args$args;
|
||||||
}
|
}
|
||||||
|
location ~ ^(?:/(.*))?$ {
|
||||||
|
proxy_pass http://salix:3001/$1$is_args$args;
|
||||||
|
}
|
||||||
location ~ ^/client(?:/(.*))?$ {
|
location ~ ^/client(?:/(.*))?$ {
|
||||||
proxy_pass http://client:3002/$1$is_args$args;
|
proxy_pass http://client:3002/$1$is_args$args;
|
||||||
}
|
}
|
||||||
location ~ ^/mailer(?:/(.*))?$ {
|
location ~ ^/mailer(?:/(.*))?$ {
|
||||||
proxy_pass http://mailer:3003/$1$is_args$args;
|
proxy_pass http://mailer:3003/$1$is_args$args;
|
||||||
}
|
}
|
||||||
location ~ ^(?:/(.*))?$ {
|
location ~ ^/production(?:/(.*))?$ {
|
||||||
proxy_pass http://salix:3001/$1$is_args$args;
|
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