Skip to content

Commit

Permalink
[Deploy] Add nginx Configuration to docker-compose.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ahnsugyeong committed May 16, 2024
1 parent d8ddd29 commit c0337d9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
5 changes: 3 additions & 2 deletions .platform/nginx/conf.d/proxy-dev.conf
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
server {
listen 80;
server_name localhost;

location / {
proxy_pass http://localhost:8080;
proxy_pass http://application:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
}

location /ws/chat {
proxy_pass http://localhost:8080;
proxy_pass http://application:8080;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
Expand Down
12 changes: 10 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.8'
services:
kafka:
image: wurstmeister/kafka:latest
Expand Down Expand Up @@ -37,4 +36,13 @@ services:
- redis
- mongo
env_file:
- .env
- .env

nginx:
image: nginx:latest
ports:
- "80:80"
volumes:
- ./.platform/nginx/conf.d/proxy.conf:/etc/nginx/conf.d/default.conf
depends_on:
- application

0 comments on commit c0337d9

Please sign in to comment.