Skip to content

Commit

Permalink
fix: 포트 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
Sangwook02 committed Jan 16, 2024
1 parent 4163a66 commit 00296da
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
container_name: nginxserver
restart: always
ports:
- "8080:8080"
- "80:80"
volumes:
- "./nginx.conf:/etc/nginx/nginx.conf"
depends_on:
Expand All @@ -18,6 +18,8 @@ services:
image: ${DOCKERHUB_USERNAME}/infra_practice_server:latest
container_name: deploy_container
restart: always
expose:
- 8080
network_mode: host
env_file:
- .env
Expand Down
8 changes: 4 additions & 4 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
http {
upstream backend {
server deploy_container:80;
upstream deploy_container {
server localhost:8080;
}

server{
listen 8080;
listen 80;

location / {
proxy_pass http://backend:8080/test;
proxy_pass http://deploy_container:8080/test;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
Expand Down

0 comments on commit 00296da

Please sign in to comment.