dockerfile y docker-compose
This commit is contained in:
parent
c6f8cec104
commit
8b68ae80c2
|
@ -0,0 +1,9 @@
|
||||||
|
FROM node:6.9.1
|
||||||
|
|
||||||
|
COPY . /app
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
CMD ["npm", "start"]
|
|
@ -0,0 +1,9 @@
|
||||||
|
FROM node:6.9.1
|
||||||
|
|
||||||
|
COPY . /app
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
CMD ["npm", "start"]
|
|
@ -0,0 +1,9 @@
|
||||||
|
FROM node:6.9.1
|
||||||
|
|
||||||
|
COPY . /app
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
CMD ["npm", "start"]
|
|
@ -0,0 +1,9 @@
|
||||||
|
FROM nginx
|
||||||
|
|
||||||
|
RUN rm /etc/nginx/nginx.conf
|
||||||
|
|
||||||
|
RUN rm /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
|
COPY nginx_docker.conf /etc/nginx/nginx.conf
|
||||||
|
|
||||||
|
COPY build /etc/nginx
|
|
@ -0,0 +1,55 @@
|
||||||
|
|
||||||
|
worker_processes 1;
|
||||||
|
|
||||||
|
error_log /var/log/nginx/error.log;
|
||||||
|
pid /var/run/nginx.pid;
|
||||||
|
|
||||||
|
events {
|
||||||
|
worker_connections 1024;
|
||||||
|
}
|
||||||
|
|
||||||
|
http {
|
||||||
|
sendfile on;
|
||||||
|
gzip on;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
|
||||||
|
access_log /var/log/nginx/access.log;
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 8080;
|
||||||
|
server_name localhost;
|
||||||
|
autoindex off;
|
||||||
|
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
|
||||||
|
location /static {
|
||||||
|
alias public;
|
||||||
|
autoindex on;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ ^/account(?:/(.*))?$ {
|
||||||
|
proxy_pass http://192.168.99.100:3000/$1$is_args$args;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ ^/salix(?:/(.*))?$ {
|
||||||
|
proxy_pass http://192.168.99.100:3001/$1$is_args$args;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ ^/customer(?:/(.*))?$ {
|
||||||
|
proxy_pass http://192.168.99.100:3002/$1$is_args$args;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
types {
|
||||||
|
text/html html;
|
||||||
|
application/json json;
|
||||||
|
application/javascript js;
|
||||||
|
text/css css scss;
|
||||||
|
text/xml xml;
|
||||||
|
image/x-icon ico;
|
||||||
|
image/png png;
|
||||||
|
image/svg+xml svg;
|
||||||
|
image/gif gif;
|
||||||
|
image/jpeg jpeg jpg;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,22 @@
|
||||||
|
version: '2'
|
||||||
|
services:
|
||||||
|
account:
|
||||||
|
build:
|
||||||
|
context: ./@salix-services/account
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
|
customer:
|
||||||
|
build:
|
||||||
|
context: ./@salix-services/customer
|
||||||
|
ports:
|
||||||
|
- "3002:3002"
|
||||||
|
nginx:
|
||||||
|
build:
|
||||||
|
context: ./@salix
|
||||||
|
ports:
|
||||||
|
- "8080:8080"
|
||||||
|
salix:
|
||||||
|
build:
|
||||||
|
context: ./@salix-services/salix
|
||||||
|
ports:
|
||||||
|
- "3001:3001"
|
Loading…
Reference in New Issue