diff --git a/.dockerignore b/.dockerignore index f965aed..da52b56 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,5 @@ node_modules +nginx.conf Dockerfile* docker-compose* .dockerignore diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..a1d67ea --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,24 @@ +version: "3.7" + +services: + node-server: + image: node-server + build: + context: . + dockerfile: Dockerfile + networks: + - "default" + + ngnix-server: + image: nginx:latest + ports: + - "80:80" + volumes: + - ./nginx.conf:/etc/nginx/nginx.conf + networks: + - "default" + depends_on: + - node-server + +networks: + default: diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..d424d12 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,13 @@ +events { worker_connections 1024;} + +http { + upstream app { + server node-server:5100; + } + server { + listen 80; + location / { + proxy_pass http://app; + } + } +} \ No newline at end of file