Merge branch 'dev' of ssh://git.verdnatura.es:/var/lib/git/salix into dev
This commit is contained in:
commit
bdb7cf9ed3
|
@ -7,7 +7,7 @@ def branchName = "${env.BRANCH_NAME}";
|
|||
def branchNameTest = "preprod";
|
||||
def branchNameProd = "master";
|
||||
def prefixDocker = "test";
|
||||
def dockerNginxName = ["nginx", "-p 80:8080 --link test-auth:auth --link test-salix:salix --link test-client:client"]
|
||||
def dockerNginxName = ["nginx", "-p 80:8080 --privileged --link test-auth:auth --link test-salix:salix --link test-client:client"]
|
||||
def dockerAuthName = ["auth", "-p 3000:3000"]
|
||||
def dockerSalixName = ["salix", "-p 3001:3001"]
|
||||
def dockerClientName = ["client", "-p 3002:3002"]
|
||||
|
|
|
@ -8,4 +8,10 @@ COPY conf-prod.conf /etc/nginx/nginx.conf
|
|||
|
||||
COPY static /usr/share/nginx/html
|
||||
|
||||
RUN apt-get update && apt-get -y install vim dnsmasq dnsutils
|
||||
|
||||
RUN echo listen-address=127.0.0.1 > /etc/dnsmasq.d/dnsmasq.conf
|
||||
|
||||
CMD service dnsmasq restart && nginx -g "daemon off;"
|
||||
|
||||
EXPOSE 8080
|
|
@ -9,7 +9,7 @@ http {
|
|||
sendfile on;
|
||||
gzip on;
|
||||
default_type application/octet-stream;
|
||||
|
||||
resolver 127.0.0.1;
|
||||
include /etc/nginx/mime.types;
|
||||
|
||||
server {
|
||||
|
@ -20,20 +20,20 @@ http {
|
|||
root /usr/share/nginx/html;
|
||||
|
||||
location /static {
|
||||
alias public;
|
||||
alias /usr/share/nginx/html;
|
||||
autoindex on;
|
||||
}
|
||||
|
||||
location ~ ^/auth(?:/(.*))?$ {
|
||||
proxy_pass http://test-auth:3000/$1$is_args$args;
|
||||
proxy_pass http://auth:3000/$1$is_args$args;
|
||||
}
|
||||
|
||||
location ~ ^/salix(?:/(.*))?$ {
|
||||
proxy_pass http://test-salix:3001/$1$is_args$args;
|
||||
proxy_pass http://salix:3001/$1$is_args$args;
|
||||
}
|
||||
|
||||
location ~ ^/client(?:/(.*))?$ {
|
||||
proxy_pass http://test-client:3002/$1$is_args$args;
|
||||
proxy_pass http://client:3002/$1$is_args$args;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -7,7 +7,7 @@
|
|||
<body>
|
||||
<vn-app id="app"></vn-app>
|
||||
<script type="text/javascript"
|
||||
src="/salix/routes.js">
|
||||
src="/static/routes.js">
|
||||
</script>
|
||||
<script type="text/javascript"
|
||||
src="/static/bundle.manifest.js">
|
||||
|
|
|
@ -21,19 +21,4 @@ module.exports = function (app) {
|
|||
res.redirect(authUrl);
|
||||
}
|
||||
});
|
||||
|
||||
app.get('/routes.js', (req, res) => {
|
||||
if (true || req.cookies['salix-session']) {
|
||||
// TODO: construir js dinamico de las rutas
|
||||
//res.set('Content-Type', 'application/javascript');
|
||||
var options = {
|
||||
root: 'services/nginx/static/'
|
||||
};
|
||||
res.sendFile('routes.js', options);
|
||||
}
|
||||
else {
|
||||
res.status(401);
|
||||
res.send('No autorizado');
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue