Skip to content

Commit

Permalink
Add nginx and docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
Luan-vP committed Dec 27, 2023
1 parent af89336 commit 2ee8765
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -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:
13 changes: 13 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
events { worker_connections 1024;}

http {
upstream app {
server node-server:5100;
}
server {
listen 80;
location / {
proxy_pass http://app;
}
}
}

0 comments on commit 2ee8765

Please sign in to comment.