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 6f88656
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
nginx.conf
Dockerfile*
docker-compose*
.dockerignore
Expand Down
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 6f88656

Please sign in to comment.